com.yandex.mobile.ads.nativeads.template.appearance
Class TextAppearance.Builder
java.lang.Object
com.yandex.mobile.ads.nativeads.template.appearance.TextAppearance.Builder
- Enclosing class:
- TextAppearance
public static final class TextAppearance.Builder
extends java.lang.Object
Builds a
TextAppearance
.Constructor Summary
Constructor and Description |
---|
Builder()
Creates a new
TextAppearance.Builder for constructing a TextAppearance |
Method Summary
Modifier and Type | Method and Description |
---|---|
TextAppearance | build()
Constructs a
TextAppearance with the specified appearance values. |
TextAppearance.Builder | setFontFamilyName(java.lang.String fontFamilyName)
Returns TextView appearance configured with name of the font family.
|
TextAppearance.Builder | setFontStyle(int fontStyle)
Returns TextView appearance configured with style of the font.
|
TextAppearance.Builder | setTextColor(int textColor)
Returns TextView appearance configured with text color.
|
TextAppearance.Builder | setTextSize(float textSize)
Returns TextView appearance configured with text size.
|
Method Detail
build
@NonNull public TextAppearance build()
Constructs a
TextAppearance
with the specified appearance values.- Returns:
TextAppearance
.
setTextColor
@NonNull public TextAppearance.Builder setTextColor(int textColor)
Returns TextView appearance configured with text color.
- Parameters:
textColor
- TextView text color.- Returns:
- TextAppearance.Builder with the specified text color.
setTextSize
@NonNull public TextAppearance.Builder setTextSize(float textSize)
Returns TextView appearance configured with text size.
- Parameters:
textSize
- TextView text size.- Returns:
- TextAppearance.Builder with the specified text size.
setFontFamilyName
@NonNull public TextAppearance.Builder setFontFamilyName(@Nullable java.lang.String fontFamilyName)
Returns TextView appearance configured with name of the font family.
- Parameters:
fontFamilyName
- The name of the font family. May be null.- Returns:
- TextAppearance.Builder with the specified text font.
setFontStyle
public TextAppearance.Builder setFontStyle(int fontStyle)
Returns TextView appearance configured with style of the font.
- Parameters:
fontStyle
- The style (normal, bold, italic) of the font.- Returns:
- TextAppearance.Builder with the specified text font.