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 aTextAppearance
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a newTextAppearance.Builder
for constructing aTextAppearance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextAppearance
build()
Constructs aTextAppearance
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.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a newTextAppearance.Builder
for constructing aTextAppearance
-
-
Method Detail
-
build
@NonNull public TextAppearance build()
Constructs aTextAppearance
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.
-
-