LayoutElementBuilders.FontStyle.Builder

Added in 1.0.0
Deprecated in 1.2.0

class LayoutElementBuilders.FontStyle.Builder


Builder for FontStyle

Summary

Public constructors

Public functions

LayoutElementBuilders.FontStyle

Builds an instance from accumulated values.

LayoutElementBuilders.FontStyle.Builder

Sets the text color.

LayoutElementBuilders.FontStyle.Builder
setItalic(italic: Boolean)

Sets whether the text should be rendered in a italic typeface.

LayoutElementBuilders.FontStyle.Builder

Sets whether the text should be rendered in a italic typeface.

LayoutElementBuilders.FontStyle.Builder

Sets the text letter-spacing.

LayoutElementBuilders.FontStyle.Builder

Sets the size of the font, in scaled pixels (sp).

LayoutElementBuilders.FontStyle.Builder
setUnderline(underline: Boolean)

Sets whether the text should be rendered with an underline.

LayoutElementBuilders.FontStyle.Builder

Sets whether the text should be rendered with an underline.

LayoutElementBuilders.FontStyle.Builder

Sets the variant of a font.

LayoutElementBuilders.FontStyle.Builder

Sets the variant of a font.

LayoutElementBuilders.FontStyle.Builder
setWeight(weight: Int)

Sets the weight of the font.

LayoutElementBuilders.FontStyle.Builder

Sets the weight of the font.

Public constructors

Builder

Added in 1.0.0
Deprecated in 1.2.0
Builder()

Public functions

build

Added in 1.0.0
Deprecated in 1.2.0
fun build(): LayoutElementBuilders.FontStyle

Builds an instance from accumulated values.

setColor

Added in 1.0.0
Deprecated in 1.2.0
fun setColor(color: ColorBuilders.ColorProp): LayoutElementBuilders.FontStyle.Builder

Sets the text color. If not defined, defaults to white.

setItalic

Added in 1.0.0
Deprecated in 1.2.0
fun setItalic(italic: Boolean): LayoutElementBuilders.FontStyle.Builder

Sets whether the text should be rendered in a italic typeface. If not specified, defaults to "false".

setItalic

Added in 1.0.0
Deprecated in 1.2.0
fun setItalic(italic: TypeBuilders.BoolProp): LayoutElementBuilders.FontStyle.Builder

Sets whether the text should be rendered in a italic typeface. If not specified, defaults to "false".

setLetterSpacing

Added in 1.0.0
Deprecated in 1.2.0
fun setLetterSpacing(letterSpacing: DimensionBuilders.EmProp): LayoutElementBuilders.FontStyle.Builder

Sets the text letter-spacing. Positive numbers increase the space between letters while negative numbers tighten the space. If not specified, defaults to 0.

setSize

Added in 1.0.0
Deprecated in 1.2.0
fun setSize(size: DimensionBuilders.SpProp): LayoutElementBuilders.FontStyle.Builder

Sets the size of the font, in scaled pixels (sp). If not specified, defaults to the size of the system's "body" font.

setUnderline

Added in 1.0.0
Deprecated in 1.2.0
fun setUnderline(underline: Boolean): LayoutElementBuilders.FontStyle.Builder

Sets whether the text should be rendered with an underline. If not specified, defaults to "false".

setUnderline

Added in 1.0.0
Deprecated in 1.2.0
fun setUnderline(underline: TypeBuilders.BoolProp): LayoutElementBuilders.FontStyle.Builder

Sets whether the text should be rendered with an underline. If not specified, defaults to "false".

setVariant

Added in 1.0.0
Deprecated in 1.2.0
@TilesExperimental
fun setVariant(variant: Int): LayoutElementBuilders.FontStyle.Builder

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

setVariant

Added in 1.0.0
Deprecated in 1.2.0
@TilesExperimental
fun setVariant(variant: LayoutElementBuilders.FontVariantProp): LayoutElementBuilders.FontStyle.Builder

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

setWeight

Added in 1.0.0
Deprecated in 1.2.0
fun setWeight(weight: Int): LayoutElementBuilders.FontStyle.Builder

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

setWeight

Added in 1.0.0
Deprecated in 1.2.0
fun setWeight(weight: LayoutElementBuilders.FontWeightProp): LayoutElementBuilders.FontStyle.Builder

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