LayoutElementBuilders.FontStyle.Builder
public final class LayoutElementBuilders.FontStyle.Builder
Builder for FontStyle
Summary
Public constructors |
|---|
|
Public methods
public @NonNull LayoutElementBuilders.FontStyle.BuildersetColor(@NonNull ColorBuilders.ColorProp color)
Sets the text color. If not defined, defaults to white.
public @NonNull LayoutElementBuilders.FontStyle.BuildersetItalic(boolean italic)
Sets whether the text should be rendered in a italic typeface. If not specified, defaults to "false".
public @NonNull LayoutElementBuilders.FontStyle.BuildersetItalic(@NonNull TypeBuilders.BoolProp italic)
Sets whether the text should be rendered in a italic typeface. If not specified, defaults to "false".
public @NonNull LayoutElementBuilders.FontStyle.BuildersetLetterSpacing(@NonNull DimensionBuilders.EmProp letterSpacing)
Sets the text letter-spacing. Positive numbers increase the space between letters while negative numbers tighten the space. If not specified, defaults to 0.
public @NonNull LayoutElementBuilders.FontStyle.BuildersetSize(@NonNull DimensionBuilders.SpProp size)
Sets the size of the font, in scaled pixels (sp). If not specified, defaults to the size of the system's "body" font.
public @NonNull LayoutElementBuilders.FontStyle.BuildersetUnderline(boolean underline)
Sets whether the text should be rendered with an underline. If not specified, defaults to "false".
public @NonNull LayoutElementBuilders.FontStyle.BuildersetUnderline(@NonNull TypeBuilders.BoolProp underline)
Sets whether the text should be rendered with an underline. If not specified, defaults to "false".
@TilesExperimental
public @NonNull LayoutElementBuilders.FontStyle.BuildersetVariant(int variant)
Sets the variant of a font. Some renderers may use different fonts for title and body text, which can be selected using this field. If not specified, defaults to "body".
@TilesExperimental
public @NonNull LayoutElementBuilders.FontStyle.BuildersetVariant(@NonNull LayoutElementBuilders.FontVariantProp variant)
Sets the variant of a font. Some renderers may use different fonts for title and body text, which can be selected using this field. If not specified, defaults to "body".
public @NonNull LayoutElementBuilders.FontStyle.BuildersetWeight(int weight)
Sets the weight of the font. If the provided value is not supported on a platform, the nearest supported value will be used. If not defined, or when set to an invalid value, defaults to "normal".
public @NonNull LayoutElementBuilders.FontStyle.BuildersetWeight(@NonNull LayoutElementBuilders.FontWeightProp weight)
Sets the weight of the font. If the provided value is not supported on a platform, the nearest supported value will be used. If not defined, or when set to an invalid value, defaults to "normal".