TextAppearanceInfo.Builder  |  API reference  |  Android Developers


public static final class TextAppearanceInfo.Builder
extends Object



Builder for TextAppearanceInfo.

Summary

Public constructors

Builder()

Public methods

TextAppearanceInfo build()

Returns TextAppearanceInfo using parameters in this TextAppearanceInfo.Builder.

TextAppearanceInfo.Builder setAllCaps(boolean allCaps)

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

TextAppearanceInfo.Builder setElegantTextHeight(boolean elegantTextHeight)

Set the elegant height metrics flag.

TextAppearanceInfo.Builder setFallbackLineSpacing(boolean fallbackLineSpacing)

Set whether to expand linespacing based on fallback fonts.

TextAppearanceInfo.Builder setFontFeatureSettings(String fontFeatureSettings)

Set the font feature settings.

TextAppearanceInfo.Builder setFontVariationSettings(String fontVariationSettings)

Set the font variation settings.

TextAppearanceInfo.Builder setHighlightTextColor(int highlightTextColor)

Set the color of the text selection highlight.

TextAppearanceInfo.Builder setHintTextColor(int hintTextColor)

Set the current color of the hint text.

TextAppearanceInfo.Builder setLetterSpacing(float letterSpacing)

Set the text letter-spacing, which determines the spacing between characters.

TextAppearanceInfo.Builder setLineBreakStyle(int lineBreakStyle)

Set the line-break strategies for text wrapping.

TextAppearanceInfo.Builder setLineBreakWordStyle(int lineBreakWordStyle)

Set the line-break word strategies for text wrapping.

TextAppearanceInfo.Builder setLinkTextColor(int linkTextColor)

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

TextAppearanceInfo.Builder setShadowColor(int shadowColor)

Set the color of the text shadow.

TextAppearanceInfo.Builder setShadowDx(float shadowDx)

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

TextAppearanceInfo.Builder setShadowDy(float shadowDy)

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

TextAppearanceInfo.Builder setShadowRadius(float shadowRadius)

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

TextAppearanceInfo.Builder setSystemFontFamilyName(String systemFontFamilyName)

Set the system font family name if the Typeface of the text is created from a system font family.

TextAppearanceInfo.Builder setTextColor(int textColor)

Set the current text color of the editor.

TextAppearanceInfo.Builder setTextFontWeight(int textFontWeight)

Set the weight of the text.

TextAppearanceInfo.Builder setTextLocales(LocaleList textLocales)

Set the LocaleList of the text.

TextAppearanceInfo.Builder setTextScaleX(float textScaleX)

Set the extent by which text should be stretched horizontally.

TextAppearanceInfo.Builder setTextSize(float textSize)

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

TextAppearanceInfo.Builder setTextStyle(int textStyle)

Set the style (normal, bold, italic, bold|italic) of the text.

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder ()

Public methods

setElegantTextHeight

public TextAppearanceInfo.Builder setElegantTextHeight (boolean elegantTextHeight)

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.

Parameters
elegantTextHeight boolean
Returns
TextAppearanceInfo.Builder This value cannot be null.

setFallbackLineSpacing

public TextAppearanceInfo.Builder setFallbackLineSpacing (boolean fallbackLineSpacing)

Set whether to expand linespacing based on fallback fonts.

Parameters
fallbackLineSpacing boolean
Returns
TextAppearanceInfo.Builder This value cannot be null.

setLetterSpacing

public TextAppearanceInfo.Builder setLetterSpacing (float letterSpacing)

Set the text letter-spacing, which determines the spacing between characters. The value is in 'EM' units. Normally, this value is 0.0.

Parameters
letterSpacing float
Returns
TextAppearanceInfo.Builder This value cannot be null.

setShadowRadius

public TextAppearanceInfo.Builder setShadowRadius (float shadowRadius)

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

Parameters
shadowRadius float: The units of this value are pixels.
Returns
TextAppearanceInfo.Builder This value cannot be null.

setSystemFontFamilyName

public TextAppearanceInfo.Builder setSystemFontFamilyName (String systemFontFamilyName)

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.
Returns
TextAppearanceInfo.Builder This value cannot be null.

setTextSize

public TextAppearanceInfo.Builder setTextSize (float textSize)

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

Parameters
textSize float: The units of this value are pixels.
Returns
TextAppearanceInfo.Builder This value cannot be null.