Builder
class Builder
| kotlin.Any | |
| ↳ | android.view.inputmethod.TextAppearanceInfo.Builder |
Builder for TextAppearanceInfo.
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| TextAppearanceInfo |
build()Returns |
| TextAppearanceInfo.Builder |
setAllCaps(allCaps: Boolean)Set whether the transformation method applied to the current editor is set to all caps. |
| TextAppearanceInfo.Builder |
setElegantTextHeight(elegantTextHeight: Boolean)Set the elegant height metrics flag. |
| TextAppearanceInfo.Builder |
setFallbackLineSpacing(fallbackLineSpacing: Boolean)Set whether to expand linespacing based on fallback fonts. |
| TextAppearanceInfo.Builder |
setFontFeatureSettings(fontFeatureSettings: String?)Set the font feature settings. |
| TextAppearanceInfo.Builder |
setFontVariationSettings(fontVariationSettings: String?)Set the font variation settings. |
| TextAppearanceInfo.Builder |
setHighlightTextColor(highlightTextColor: Int)Set the color of the text selection highlight. |
| TextAppearanceInfo.Builder |
setHintTextColor(hintTextColor: Int)Set the current color of the hint text. |
| TextAppearanceInfo.Builder |
setLetterSpacing(letterSpacing: Float)Set the text letter-spacing, which determines the spacing between characters. |
| TextAppearanceInfo.Builder |
setLineBreakStyle(lineBreakStyle: Int)Set the line-break strategies for text wrapping. |
| TextAppearanceInfo.Builder |
setLineBreakWordStyle(lineBreakWordStyle: Int)Set the line-break word strategies for text wrapping. |
| TextAppearanceInfo.Builder |
setLinkTextColor(linkTextColor: Int)Set the text color used to paint the links in the editor. |
| TextAppearanceInfo.Builder |
setShadowColor(shadowColor: Int)Set the color of the text shadow. |
| TextAppearanceInfo.Builder |
setShadowDx(shadowDx: Float)Set the horizontal offset (in pixels) of the text shadow. |
| TextAppearanceInfo.Builder |
setShadowDy(shadowDy: Float)Set the vertical offset (in pixels) of the text shadow. |
| TextAppearanceInfo.Builder |
setShadowRadius(shadowRadius: Float)Set the blur radius (in pixels) of the text shadow. |
| TextAppearanceInfo.Builder |
setSystemFontFamilyName(systemFontFamilyName: String?)Set the system font family name if the |
| TextAppearanceInfo.Builder |
setTextColor(textColor: Int)Set the current text color of the editor. |
| TextAppearanceInfo.Builder |
setTextFontWeight(textFontWeight: Int)Set the weight of the text. |
| TextAppearanceInfo.Builder |
setTextLocales(textLocales: LocaleList)Set the |
| TextAppearanceInfo.Builder |
setTextScaleX(textScaleX: Float)Set the extent by which text should be stretched horizontally. |
| TextAppearanceInfo.Builder |
setTextSize(textSize: Float)Set the text size (in pixels) obtained from the current editor. |
| TextAppearanceInfo.Builder |
setTextStyle(textStyle: Int)Set the style (normal, bold, italic, bold|italic) of the text. |
Public constructors
Builder
Builder()
Public methods
build
fun build(): TextAppearanceInfo
Returns TextAppearanceInfo using parameters in this TextAppearanceInfo.Builder.
| Return | |
|---|---|
TextAppearanceInfo |
This value cannot be null. |
setAllCaps
fun setAllCaps(allCaps: Boolean): TextAppearanceInfo.Builder
Set whether the transformation method applied to the current editor is set to all caps.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setElegantTextHeight
fun setElegantTextHeight(elegantTextHeight: Boolean): TextAppearanceInfo.Builder
Set the elegant height metrics flag. This setting selects font variants that have not been compacted to fit Latin-based vertical metrics, and also increases top and bottom bounds to provide more space.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setFallbackLineSpacing
fun setFallbackLineSpacing(fallbackLineSpacing: Boolean): TextAppearanceInfo.Builder
Set whether to expand linespacing based on fallback fonts.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setFontFeatureSettings
fun setFontFeatureSettings(fontFeatureSettings: String?): TextAppearanceInfo.Builder
Set the font feature settings.
| Parameters | |
|---|---|
fontFeatureSettings |
String?: This value may be null. |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setFontVariationSettings
fun setFontVariationSettings(fontVariationSettings: String?): TextAppearanceInfo.Builder
Set the font variation settings. Set null if no variation is specified.
| Parameters | |
|---|---|
fontVariationSettings |
String?: This value may be null. |
setHighlightTextColor
fun setHighlightTextColor(highlightTextColor: Int): TextAppearanceInfo.Builder
Set the color of the text selection highlight.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setHintTextColor
fun setHintTextColor(hintTextColor: Int): TextAppearanceInfo.Builder
Set the current color of the hint text.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setLetterSpacing
fun setLetterSpacing(letterSpacing: Float): TextAppearanceInfo.Builder
Set the text letter-spacing, which determines the spacing between characters. The value is in 'EM' units. Normally, this value is 0.0.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setLineBreakStyle
fun setLineBreakStyle(lineBreakStyle: Int): TextAppearanceInfo.Builder
Set the line-break strategies for text wrapping.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setLineBreakWordStyle
fun setLineBreakWordStyle(lineBreakWordStyle: Int): TextAppearanceInfo.Builder
Set the line-break word strategies for text wrapping.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setLinkTextColor
fun setLinkTextColor(linkTextColor: Int): TextAppearanceInfo.Builder
Set the text color used to paint the links in the editor.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setShadowColor
fun setShadowColor(shadowColor: Int): TextAppearanceInfo.Builder
Set the color of the text shadow.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setShadowDx
fun setShadowDx(shadowDx: Float): TextAppearanceInfo.Builder
Set the horizontal offset (in pixels) of the text shadow.
| Parameters | |
|---|---|
shadowDx |
Float: The units of this value are pixels. |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setShadowDy
fun setShadowDy(shadowDy: Float): TextAppearanceInfo.Builder
Set the vertical offset (in pixels) of the text shadow.
| Parameters | |
|---|---|
shadowDy |
Float: The units of this value are pixels. |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setShadowRadius
fun setShadowRadius(shadowRadius: Float): TextAppearanceInfo.Builder
Set the blur radius (in pixels) of the text shadow.
| Parameters | |
|---|---|
shadowRadius |
Float: The units of this value are pixels. |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setSystemFontFamilyName
fun setSystemFontFamilyName(systemFontFamilyName: String?): TextAppearanceInfo.Builder
Set the system font family name if the Typeface of the text is created from a system font family.
| Parameters | |
|---|---|
systemFontFamilyName |
String?: This value may be null. |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setTextColor
fun setTextColor(textColor: Int): TextAppearanceInfo.Builder
Set the current text color of the editor.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setTextFontWeight
fun setTextFontWeight(textFontWeight: Int): TextAppearanceInfo.Builder
Set the weight of the text.
| Parameters | |
|---|---|
textFontWeight |
Int: Value is between android.graphics.fonts.FontStyle#FONT_WEIGHT_UNSPECIFIED and android.graphics.fonts.FontStyle#FONT_WEIGHT_MAX inclusive |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setTextLocales
fun setTextLocales(textLocales: LocaleList): TextAppearanceInfo.Builder
Set the LocaleList of the text.
| Parameters | |
|---|---|
textLocales |
LocaleList: This value cannot be null. |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setTextScaleX
fun setTextScaleX(textScaleX: Float): TextAppearanceInfo.Builder
Set the extent by which text should be stretched horizontally.
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setTextSize
fun setTextSize(textSize: Float): TextAppearanceInfo.Builder
Set the text size (in pixels) obtained from the current editor.
| Parameters | |
|---|---|
textSize |
Float: The units of this value are pixels. |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
setTextStyle
fun setTextStyle(textStyle: Int): TextAppearanceInfo.Builder
Set the style (normal, bold, italic, bold|italic) of the text.
| Parameters | |
|---|---|
textStyle |
Int: Value is android.graphics.Typeface#NORMAL, android.graphics.Typeface#BOLD, android.graphics.Typeface#ITALIC, or android.graphics.Typeface#BOLD_ITALIC |
| Return | |
|---|---|
TextAppearanceInfo.Builder |
This value cannot be null. |
See Also