Class TextAppearance.Builder

com.yandex.mobile.ads.nativeads.template.appearance

public  class  TextAppearance.Builder 

Class for changing settings for the standard text layout.

Methods

Builder()

Creates an object of the TextAppearance.Builder class.

TextAppearance build()

Creates an object of the TextAppearance class with the specified values.

TextAppearance.Builder setFontFamilyName(final String fontFamilyName)

Specifies the name of the font.

TextAppearance.Builder setFontStyle(final int fontStyle)

Sets the font style.

TextAppearance.Builder setTextColor(final int textColor)

Sets the text color.

TextAppearance.Builder setTextSize(final float textSize)

Sets the size of the text.

Method Detail

Builder

public Builder ()

Creates an object of the TextAppearance.Builder class.

build

public TextAppearance build ()

Creates an object of the TextAppearance class with the specified values.

Returns:

An object of the TextAppearance class with the specified values.

setFontFamilyName

public TextAppearance.Builder setFontFamilyName (final String fontFamilyName)

Specifies the name of the font.

Parameters:
fontFamilyName

Font name. The value can be null, which indicates the default system font.

Returns:

An object of the TextAppearance.Builder class with the specified font name.

setFontStyle

public TextAppearance.Builder setFontStyle (final int fontStyle)

Sets the font style.

Parameters:
fontStyle

Font style (normal, bold, italic).

Returns:

An object of the TextAppearance.Builder class with the specified font style.

setTextColor

public TextAppearance.Builder setTextColor (final int textColor)

Sets the text color.

Parameters:
textColor

Text color.

Returns:

An object of the TextAppearance.Builder class with the specified text color.

setTextSize

public TextAppearance.Builder setTextSize (final float textSize)

Sets the size of the text.

Parameters:
textSize

Text size in scale-independent pixels.

Returns:

An object of the TextAppearance.Builder class with the specified text size.