public final class

LayoutElementBuilders.Spannable

extends java.lang.Object

implements LayoutElementBuilders.LayoutElement

 java.lang.Object

↳androidx.wear.tiles.LayoutElementBuilders.Spannable

Overview

A container of LayoutElementBuilders.Span elements. Currently, this supports LayoutElementBuilders.SpanImage and LayoutElementBuilders.SpanText elements, where each individual LayoutElementBuilders.Span can have different styling applied to it but the resulting text will flow naturally. This allows sections of a paragraph of text to have different styling applied to it, for example, making one or two words bold or italic.

Summary

Methods
public FingerprintgetFingerprint()

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.Spannable element.

public ModifiersBuilders.ModifiersgetModifiers()

Gets ModifiersBuilders.Modifiers for this element.

public LayoutElementBuilders.HorizontalAlignmentPropgetMultilineAlignment()

Gets alignment of the LayoutElementBuilders.Spannable content within its bounds.

public LayoutElementBuilders.TextOverflowPropgetOverflow()

Gets how to handle content which overflows the bound of the LayoutElementBuilders.Spannable element.

public java.util.List<LayoutElementBuilders.Span>getSpans()

Gets the LayoutElementBuilders.Span elements that form this LayoutElementBuilders.Spannable.

public LayoutElementProto.LayoutElementtoLayoutElementProto()

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

Methods

public java.util.List<LayoutElementBuilders.Span> getSpans()

Gets the LayoutElementBuilders.Span elements that form this LayoutElementBuilders.Spannable. 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.Spannable element. If not defined, the LayoutElementBuilders.Spannable element will be treated as a single-line element. Intended for testing purposes only.

public LayoutElementBuilders.HorizontalAlignmentProp getMultilineAlignment()

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

Gets how to handle content which overflows the bound of the LayoutElementBuilders.Spannable element. A LayoutElementBuilders.Spannable 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 content, the content 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()