LayoutElementBuilders.SpanText

public final class LayoutElementBuilders.SpanText implements LayoutElementBuilders.Span


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

Summary

Public methods

builder

@NonNull
public static LayoutElementBuilders.SpanText.Builder builder()

Returns a new Builder.

getFontStyle

@Nullable
@NonNull
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.

getModifiers

@Nullable
@NonNull
public ModifiersBuilders.SpanModifiers getModifiers()

Gets androidx.wear.tiles.ModifiersBuilders.Modifiers for this element. Intended for testing purposes only.

getText

@Nullable
@NonNull
public TypeBuilders.StringProp getText()

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