TextAppearanceInfo
class TextAppearanceInfo : Parcelable
| kotlin.Any | |
| ↳ | android.view.inputmethod.TextAppearanceInfo |
Information about text appearance in an editor, passed through CursorAnchorInfo for use by InputMethodService.
Summary
| Nested classes | |
|---|---|
|
Builder for |
|
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| Boolean | |
| String? |
Returns the font feature settings. |
| String? |
Returns the font variation settings. |
| Int |
Returns the color of the text selection highlight. |
| Int |
Returns the current color of the hint text. |
| Float |
Returns the text letter-spacing, which determines the spacing between characters. |
| Int |
Returns the line-break strategies for text wrapping. |
| Int |
Returns the line-break word strategies for text wrapping. |
| Int |
Returns the text color used to paint the links in the editor. |
| Int |
Returns the color of the text shadow. |
| Float |
Returns the horizontal offset (in pixels) of the text shadow. |
| Float |
Returns the vertical offset (in pixels) of the text shadow. |
| Float |
Returns the blur radius (in pixels) of the text shadow. |
| String? |
Returns the font family name if the |
| Int |
Returns the current text color of the editor. |
| Int |
Returns the weight of the text, or |
| LocaleList |
Returns the |
| Float |
Returns the extent by which text should be stretched horizontally. |
| Float |
Returns the text size (in pixels) for current editor. |
| Int |
Returns the style (normal, bold, italic, bold|italic) of the text. |
| Int |
hashCode() |
| Boolean |
Returns whether the transformation method applied to the current editor is set to all caps. |
| Boolean |
Returns |
| Boolean |
Returns whether to expand linespacing based on fallback fonts. |
| String |
toString() |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<TextAppearanceInfo!> | |
Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
equals
fun equals(other: Any?): Boolean
| Parameters | |
|---|---|
obj |
the reference object with which to compare. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getFontFeatureSettings
fun getFontFeatureSettings(): String?
Returns the font feature settings. Returns null if not specified.
getFontVariationSettings
fun getFontVariationSettings(): String?
Returns the font variation settings. Returns null if no variation is specified.
getHighlightTextColor
fun getHighlightTextColor(): Int
Returns the color of the text selection highlight.
getHintTextColor
fun getHintTextColor(): Int
Returns the current color of the hint text.
getLetterSpacing
fun getLetterSpacing(): Float
Returns the text letter-spacing, which determines the spacing between characters. The value is in 'EM' units. Normally, this value is 0.0.
getLineBreakStyle
fun getLineBreakStyle(): Int
Returns the line-break strategies for text wrapping.
getLineBreakWordStyle
fun getLineBreakWordStyle(): Int
Returns the line-break word strategies for text wrapping.
getLinkTextColor
fun getLinkTextColor(): Int
Returns the text color used to paint the links in the editor.
getShadowColor
fun getShadowColor(): Int
Returns the color of the text shadow.
getShadowDx
fun getShadowDx(): Float
Returns the horizontal offset (in pixels) of the text shadow.
The units of this value are pixels.
| Return | |
|---|---|
Float |
The units of this value are pixels. |
getShadowDy
fun getShadowDy(): Float
Returns the vertical offset (in pixels) of the text shadow.
The units of this value are pixels.
| Return | |
|---|---|
Float |
The units of this value are pixels. |
getShadowRadius
fun getShadowRadius(): Float
Returns the blur radius (in pixels) of the text shadow.
The units of this value are pixels.
| Return | |
|---|---|
Float |
The units of this value are pixels. |
getSystemFontFamilyName
fun getSystemFontFamilyName(): String?
Returns the font family name if the Typeface of the text is created from a system font family. Returns null if no Typeface is specified, or it is not created from a system font family.
getTextColor
fun getTextColor(): Int
Returns the current text color of the editor.
getTextFontWeight
fun getTextFontWeight(): Int
Returns the weight of the text, or FontStyle#FONT_WEIGHT_UNSPECIFIED when no Typeface is specified.
| Return | |
|---|---|
Int |
Value is between android.graphics.fonts.FontStyle#FONT_WEIGHT_UNSPECIFIED and android.graphics.fonts.FontStyle#FONT_WEIGHT_MAX inclusive |
getTextLocales
fun getTextLocales(): LocaleList
Returns the LocaleList of the text.
| Return | |
|---|---|
LocaleList |
This value cannot be null. |
getTextScaleX
fun getTextScaleX(): Float
Returns the extent by which text should be stretched horizontally. Returns 1.0 if not specified.
getTextSize
fun getTextSize(): Float
Returns the text size (in pixels) for current editor.
The units of this value are pixels.
| Return | |
|---|---|
Float |
The units of this value are pixels. |
getTextStyle
fun getTextStyle(): Int
Returns the style (normal, bold, italic, bold|italic) of the text. Returns Typeface.NORMAL when no Typeface is specified.
| Return | |
|---|---|
Int |
Value is android.graphics.Typeface#NORMAL, android.graphics.Typeface#BOLD, android.graphics.Typeface#ITALIC, or android.graphics.Typeface#BOLD_ITALIC |
See Also
isAllCaps
fun isAllCaps(): Boolean
Returns whether the transformation method applied to the current editor is set to all caps.
isElegantTextHeight
fun isElegantTextHeight(): Boolean
Returns true if the elegant height metrics flag is set. 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.
isFallbackLineSpacing
fun isFallbackLineSpacing(): Boolean
Returns whether to expand linespacing based on fallback fonts.
toString
fun toString(): String
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |