Added in API level 34

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 TextAppearanceInfo.

Inherited constants
Public methods
Int

Boolean
equals(other: Any?)

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

Int

Returns the current text color of the editor.

Int

Returns the weight of the text, or FontStyle#FONT_WEIGHT_UNSPECIFIED when no Typeface is specified.

LocaleList

Returns the LocaleList of the text.

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

Boolean

Returns whether the transformation method applied to the current editor is set to all caps.

Boolean

Returns true if the elegant height metrics flag is set.

Boolean

Returns whether to expand linespacing based on fallback fonts.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<TextAppearanceInfo!>

Public methods

describeContents

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

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

Added in API level 34
fun getFontFeatureSettings(): String?

Returns the font feature settings. Returns null if not specified.

getFontVariationSettings

Added in API level 34
fun getFontVariationSettings(): String?

Returns the font variation settings. Returns null if no variation is specified.

getHighlightTextColor

Added in API level 34
fun getHighlightTextColor(): Int

Returns the color of the text selection highlight.

getHintTextColor

Added in API level 34
fun getHintTextColor(): Int

Returns the current color of the hint text.

getLetterSpacing

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

getLinkTextColor

Added in API level 34
fun getLinkTextColor(): Int

Returns the text color used to paint the links in the editor.

getShadowColor

Added in API level 34
fun getShadowColor(): Int

Returns the color of the text shadow.

getShadowDx

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

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

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

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

Added in API level 34
fun getTextColor(): Int

Returns the current text color of the editor.

getTextFontWeight

Added in API level 34
fun getTextFontWeight(): Int

Returns the weight of the text, or FontStyle#FONT_WEIGHT_UNSPECIFIED when no Typeface is specified.

Return
Int Value is between FontStyle.FONT_WEIGHT_UNSPECIFIED and FontStyle.FONT_WEIGHT_MAX inclusive

getTextLocales

Added in API level 34
fun getTextLocales(): LocaleList

Returns the LocaleList of the text.

Return
LocaleList This value cannot be null.

getTextScaleX

Added in API level 34
fun getTextScaleX(): Float

Returns the extent by which text should be stretched horizontally. Returns 1.0 if not specified.

getTextSize

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

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

hashCode

Added in API level 34
fun hashCode(): Int
Return
Int a hash code value for this object.

isAllCaps

Added in API level 34
fun isAllCaps(): Boolean

Returns whether the transformation method applied to the current editor is set to all caps.

isElegantTextHeight

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

Added in API level 34
fun isFallbackLineSpacing(): Boolean

Returns whether to expand linespacing based on fallback fonts.

toString

Added in API level 34
fun toString(): String
Return
String a string representation of the object.

writeToParcel

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

Properties

CREATOR

Added in API level 34
static val CREATOR: Parcelable.Creator<TextAppearanceInfo!>