public final class

LayoutElementBuilders.Text.Builder

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement.Builder

 java.lang.Object

↳androidx.wear.tiles.builders.LayoutElementBuilders.Text.Builder

Overview

Builder for LayoutElementBuilders.Text.

Summary

Methods
public LayoutElementBuilders.Textbuild()

public LayoutElementBuilders.Text.BuildersetFontStyle(LayoutElementBuilders.FontStyle.Builder fontStyleBuilder)

Sets the style of font to use (size, bold etc).

public LayoutElementBuilders.Text.BuildersetFontStyle(LayoutElementBuilders.FontStyle fontStyle)

Sets the style of font to use (size, bold etc).

public LayoutElementBuilders.Text.BuildersetLineHeight(DimensionBuilders.SpProp.Builder lineHeightBuilder)

Sets the explicit height between lines of text.

public LayoutElementBuilders.Text.BuildersetLineHeight(DimensionBuilders.SpProp lineHeight)

Sets the explicit height between lines of text.

public LayoutElementBuilders.Text.BuildersetMaxLines(int maxLines)

Sets the maximum number of lines that can be represented by the LayoutElementBuilders.Text element.

public LayoutElementBuilders.Text.BuildersetModifiers(ModifiersBuilders.Modifiers.Builder modifiersBuilder)

Sets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.Text.BuildersetModifiers(ModifiersBuilders.Modifiers modifiers)

Sets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.Text.BuildersetMultilineAlignment(int multilineAlignment)

Sets alignment of the text within its bounds.

public LayoutElementBuilders.Text.BuildersetOverflow(int overflow)

Sets how to handle text which overflows the bound of the LayoutElementBuilders.Text element.

public LayoutElementBuilders.Text.BuildersetText(java.lang.String text)

Sets the text to render.

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

Methods

public LayoutElementBuilders.Text.Builder setText(java.lang.String text)

Sets the text to render.

Sets the style of font to use (size, bold etc). If not specified, defaults to the platform's default body font.

Sets the style of font to use (size, bold etc). If not specified, defaults to the platform's default body font.

Sets ModifiersBuilders.Modifiers for this element.

Sets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.Text.Builder setMaxLines(int maxLines)

Sets the maximum number of lines that can be represented by the LayoutElementBuilders.Text element. If not defined, the LayoutElementBuilders.Text element will be treated as a single-line element.

public LayoutElementBuilders.Text.Builder setMultilineAlignment(int multilineAlignment)

Sets alignment of the text within its bounds. Note that a LayoutElementBuilders.Text element will size itself to wrap its contents, so this option is meaningless for single-line text (for that, use alignment of the outer container). For multi-line text, however, this will set the alignment of lines relative to the LayoutElementBuilders.Text element bounds. If not defined, defaults to TEXT_ALIGN_CENTER.

public LayoutElementBuilders.Text.Builder setOverflow(int overflow)

Sets how to handle text which overflows the bound of the LayoutElementBuilders.Text element. A LayoutElementBuilders.Text element will grow as large as possible inside its parent container (while still respecting max_lines); if it cannot grow large enough to render all of its text, the text which cannot fit inside its container will be truncated. If not defined, defaults to TEXT_OVERFLOW_TRUNCATE.

Sets the explicit height between lines of text. This is equivalent to the vertical distance between subsequent baselines. If not specified, defaults the font's recommended interline spacing.

Sets the explicit height between lines of text. This is equivalent to the vertical distance between subsequent baselines. If not specified, defaults the font's recommended interline spacing.