public final class

LayoutElementBuilders.Text

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement

 java.lang.Object

↳androidx.wear.tiles.LayoutElementBuilders.Text

Overview

A text string.

Summary

Methods
public FingerprintgetFingerprint()

public LayoutElementBuilders.FontStylegetFontStyle()

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

public DimensionBuilders.SpPropgetLineHeight()

Gets the explicit height between lines of text.

public TypeBuilders.Int32PropgetMaxLines()

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

public ModifiersBuilders.ModifiersgetModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.TextAlignmentPropgetMultilineAlignment()

Gets alignment of the text within its bounds.

public LayoutElementBuilders.TextOverflowPropgetOverflow()

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

public TypeBuilders.StringPropgetText()

Gets the text to render.

public LayoutElementProto.LayoutElementtoLayoutElementProto()

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

Methods

public TypeBuilders.StringProp getText()

Gets the text to render. Intended for testing purposes only.

public LayoutElementBuilders.FontStyle getFontStyle()

Gets the style of font to use (size, bold etc). If not specified, defaults to the platform's default body font. Intended for testing purposes only.

public ModifiersBuilders.Modifiers getModifiers()

Gets ModifiersBuilders.Modifiers for this element. Intended for testing purposes only.

public TypeBuilders.Int32Prop getMaxLines()

Gets 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. Intended for testing purposes only.

public LayoutElementBuilders.TextAlignmentProp getMultilineAlignment()

Gets 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. Intended for testing purposes only.

Gets 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. Intended for testing purposes only.

public DimensionBuilders.SpProp getLineHeight()

Gets 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. Intended for testing purposes only.

public Fingerprint getFingerprint()

public LayoutElementProto.LayoutElement toLayoutElementProto()