LayoutElementBuilders.SpanText

public static final class LayoutElementBuilders.SpanText
extends Object implements LayoutElementBuilders.Span

java.lang.Object
   ↳ androidx.wear.tiles.LayoutElementBuilders.SpanText


A portion of text which can be added to a LayoutElementBuilders.Span. Two different LayoutElementBuilders.SpanText elements on the same line will be aligned to the same baseline, regardless of the size of each LayoutElementBuilders.SpanText.

Summary

Nested classes

class LayoutElementBuilders.SpanText.Builder

Builder for LayoutElementBuilders.SpanText

Public methods

static LayoutElementBuilders.SpanText.Builder builder()

Returns a new LayoutElementBuilders.SpanText.Builder.

LayoutElementBuilders.FontStyle getFontStyle()

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

ModifiersBuilders.SpanModifiers getModifiers()

Gets ModifiersBuilders.Modifiers for this element.

TypeBuilders.StringProp getText()

Gets the text to render.

Inherited methods

Public methods

getFontStyle

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.

Returns
LayoutElementBuilders.FontStyle

getModifiers

public ModifiersBuilders.SpanModifiers getModifiers ()

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

Returns
ModifiersBuilders.SpanModifiers

getText

public TypeBuilders.StringProp getText ()

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

Returns
TypeBuilders.StringProp