Added in API level 34

Builder


class Builder
kotlin.Any
   ↳ android.view.inputmethod.TextAppearanceInfo.Builder

Builder for TextAppearanceInfo.

Summary

Public constructors

Public methods
TextAppearanceInfo

Returns TextAppearanceInfo using parameters in this TextAppearanceInfo.Builder.

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 Typeface of the text is created from a system font family.

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 LocaleList of the text.

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

Added in API level 34
fun build(): TextAppearanceInfo

Returns TextAppearanceInfo using parameters in this TextAppearanceInfo.Builder.

Return
TextAppearanceInfo This value cannot be null.

setAllCaps

Added in API level 34
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

Added in API level 34
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

Added in API level 34
fun setFallbackLineSpacing(fallbackLineSpacing: Boolean): TextAppearanceInfo.Builder

Set whether to expand linespacing based on fallback fonts.

Return
TextAppearanceInfo.Builder This value cannot be null.

setFontFeatureSettings

Added in API level 34
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

Added in API level 34
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

Added in API level 34
fun setHighlightTextColor(highlightTextColor: Int): TextAppearanceInfo.Builder

Set the color of the text selection highlight.

Return
TextAppearanceInfo.Builder This value cannot be null.

setHintTextColor

Added in API level 34
fun setHintTextColor(hintTextColor: Int): TextAppearanceInfo.Builder

Set the current color of the hint text.

Return
TextAppearanceInfo.Builder This value cannot be null.

setLetterSpacing

Added in API level 34
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.

setLinkTextColor

Added in API level 34
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

Added in API level 34
fun setShadowColor(shadowColor: Int): TextAppearanceInfo.Builder

Set the color of the text shadow.

Return
TextAppearanceInfo.Builder This value cannot be null.

setShadowDx

Added in API level 34
fun setShadowDx(shadowDx: Float): TextAppearanceInfo.Builder

Set the horizontal offset (in pixels) of the text shadow.

Parameters
shadowDx Float: This units of this value are pixels.
Return
TextAppearanceInfo.Builder This value cannot be null.

setShadowDy

Added in API level 34
fun setShadowDy(shadowDy: Float): TextAppearanceInfo.Builder

Set the vertical offset (in pixels) of the text shadow.

Parameters
shadowDy Float: This units of this value are pixels.
Return
TextAppearanceInfo.Builder This value cannot be null.

setShadowRadius

Added in API level 34
fun setShadowRadius(shadowRadius: Float): TextAppearanceInfo.Builder

Set the blur radius (in pixels) of the text shadow.

Parameters
shadowRadius Float: This units of this value are pixels.
Return
TextAppearanceInfo.Builder This value cannot be null.

setSystemFontFamilyName

Added in API level 34
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

Added in API level 34
fun setTextColor(textColor: Int): TextAppearanceInfo.Builder

Set the current text color of the editor.

Return
TextAppearanceInfo.Builder This value cannot be null.

setTextFontWeight

Added in API level 34
fun setTextFontWeight(textFontWeight: Int): TextAppearanceInfo.Builder

Set the weight of the text.

Parameters
textFontWeight Int: Value is between FontStyle.FONT_WEIGHT_UNSPECIFIED and FontStyle.FONT_WEIGHT_MAX inclusive
Return
TextAppearanceInfo.Builder This value cannot be null.

setTextLocales

Added in API level 34
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

Added in API level 34
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

Added in API level 34
fun setTextSize(textSize: Float): TextAppearanceInfo.Builder

Set the text size (in pixels) obtained from the current editor.

Parameters
textSize Float: This units of this value are pixels.
Return
TextAppearanceInfo.Builder This value cannot be null.

setTextStyle

Added in API level 34
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.