public final class

LayoutElementBuilders.FontStyle.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.tiles.LayoutElementBuilders.FontStyle.Builder

Overview

Builder for LayoutElementBuilders.FontStyle

Summary

Constructors
publicBuilder()

Methods
public LayoutElementBuilders.FontStylebuild()

Builds an instance from accumulated values.

public LayoutElementBuilders.FontStyle.BuildersetColor(ColorBuilders.ColorProp color)

Sets the text color.

public LayoutElementBuilders.FontStyle.BuildersetItalic(boolean italic)

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

public LayoutElementBuilders.FontStyle.BuildersetItalic(TypeBuilders.BoolProp italic)

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

public LayoutElementBuilders.FontStyle.BuildersetLetterSpacing(DimensionBuilders.EmProp letterSpacing)

Sets the text letter-spacing.

public LayoutElementBuilders.FontStyle.BuildersetSize(DimensionBuilders.SpProp size)

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

public LayoutElementBuilders.FontStyle.BuildersetUnderline(boolean underline)

Sets whether the text should be rendered with an underline.

public LayoutElementBuilders.FontStyle.BuildersetUnderline(TypeBuilders.BoolProp underline)

Sets whether the text should be rendered with an underline.

public LayoutElementBuilders.FontStyle.BuildersetVariant(int variant)

Sets the variant of a font.

public LayoutElementBuilders.FontStyle.BuildersetVariant(LayoutElementBuilders.FontVariantProp variant)

Sets the variant of a font.

public LayoutElementBuilders.FontStyle.BuildersetWeight(int weight)

Sets the weight of the font.

public LayoutElementBuilders.FontStyle.BuildersetWeight(LayoutElementBuilders.FontWeightProp weight)

Sets the weight of the font.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

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

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

public LayoutElementBuilders.FontStyle.Builder setItalic(boolean italic)

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

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

public LayoutElementBuilders.FontStyle.Builder setUnderline(boolean underline)

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

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

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 LayoutElementBuilders.FontStyle.Builder setWeight(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".

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

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 LayoutElementBuilders.FontStyle.Builder setVariant(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".

Builds an instance from accumulated values.