TextAppearanceInfo.Builder
public
static
final
class
TextAppearanceInfo.Builder
extends Object
java.lang.Object | |
↳ | android.view.inputmethod.TextAppearanceInfo.Builder |
Builder for TextAppearanceInfo
.
Summary
Public constructors | |
---|---|
Builder()
|
Public methods | |
---|---|
TextAppearanceInfo
|
build()
Returns |
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 |
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 |
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 | |
---|---|
Public constructors
Builder
public Builder ()
Public methods
build
public TextAppearanceInfo build ()
Returns TextAppearanceInfo
using parameters in this
TextAppearanceInfo.Builder
.
Returns | |
---|---|
TextAppearanceInfo |
This value cannot be null . |
setAllCaps
public TextAppearanceInfo.Builder setAllCaps (boolean allCaps)
Set whether the transformation method applied to the current editor is set to all caps.
Parameters | |
---|---|
allCaps |
boolean |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
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 . |
See also:
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 . |
See also:
setFontFeatureSettings
public TextAppearanceInfo.Builder setFontFeatureSettings (String fontFeatureSettings)
Set the font feature settings.
Parameters | |
---|---|
fontFeatureSettings |
String : This value may be null . |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also:
setFontVariationSettings
public TextAppearanceInfo.Builder setFontVariationSettings (String fontVariationSettings)
Set the font variation settings. Set null
if no variation is specified.
Parameters | |
---|---|
fontVariationSettings |
String : This value may be null . |
Returns | |
---|---|
TextAppearanceInfo.Builder |
See also:
setHighlightTextColor
public TextAppearanceInfo.Builder setHighlightTextColor (int highlightTextColor)
Set the color of the text selection highlight.
Parameters | |
---|---|
highlightTextColor |
int |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also:
setHintTextColor
public TextAppearanceInfo.Builder setHintTextColor (int hintTextColor)
Set the current color of the hint text.
Parameters | |
---|---|
hintTextColor |
int |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also:
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 . |
setLineBreakStyle
public TextAppearanceInfo.Builder setLineBreakStyle (int lineBreakStyle)
Set the line-break strategies for text wrapping.
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also:
setLineBreakWordStyle
public TextAppearanceInfo.Builder setLineBreakWordStyle (int lineBreakWordStyle)
Set the line-break word strategies for text wrapping.
Parameters | |
---|---|
lineBreakWordStyle |
int : Value is LineBreakConfig.LINE_BREAK_WORD_STYLE_NONE , LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE , LineBreakConfig.LINE_BREAK_WORD_STYLE_UNSPECIFIED , or LineBreakConfig.LINE_BREAK_WORD_STYLE_AUTO |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also:
setLinkTextColor
public TextAppearanceInfo.Builder setLinkTextColor (int linkTextColor)
Set the text color used to paint the links in the editor.
Parameters | |
---|---|
linkTextColor |
int |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also:
setShadowColor
public TextAppearanceInfo.Builder setShadowColor (int shadowColor)
Set the color of the text shadow.
Parameters | |
---|---|
shadowColor |
int |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
setShadowDx
public TextAppearanceInfo.Builder setShadowDx (float shadowDx)
Set the horizontal offset (in pixels) of the text shadow.
Parameters | |
---|---|
shadowDx |
float : The units of this value are pixels. |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
setShadowDy
public TextAppearanceInfo.Builder setShadowDy (float shadowDy)
Set the vertical offset (in pixels) of the text shadow.
Parameters | |
---|---|
shadowDy |
float : The units of this value are pixels. |
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 . |
See also:
setTextColor
public TextAppearanceInfo.Builder setTextColor (int textColor)
Set the current text color of the editor.
Parameters | |
---|---|
textColor |
int |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also:
setTextFontWeight
public TextAppearanceInfo.Builder setTextFontWeight (int textFontWeight)
Set the weight of the text.
Parameters | |
---|---|
textFontWeight |
int : Value is between FontStyle.FONT_WEIGHT_UNSPECIFIED and FontStyle.FONT_WEIGHT_MAX inclusive |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
setTextLocales
public TextAppearanceInfo.Builder setTextLocales (LocaleList textLocales)
Set the LocaleList
of the text.
Parameters | |
---|---|
textLocales |
LocaleList : This value cannot be null . |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
setTextScaleX
public TextAppearanceInfo.Builder setTextScaleX (float textScaleX)
Set the extent by which text should be stretched horizontally.
Parameters | |
---|---|
textScaleX |
float |
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 . |
setTextStyle
public TextAppearanceInfo.Builder setTextStyle (int textStyle)
Set the style (normal, bold, italic, bold|italic) of the text.
Parameters | |
---|---|
textStyle |
int : Value is Typeface.NORMAL , Typeface.BOLD , Typeface.ITALIC , or Typeface.BOLD_ITALIC |
Returns | |
---|---|
TextAppearanceInfo.Builder |
This value cannot be null . |
See also: