LayoutElementBuilders.SpanText
@RequiresSchemaVersion(major = 1, minor = 0)
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
Nested types |
|---|
public final class LayoutElementBuilders.SpanText.BuilderBuilder for |
Public methods |
|
|---|---|
@Nullable LayoutElementBuilders.FontStyle |
Gets the style of font to use (size, bold etc). |
@Nullable ModifiersBuilders.SpanModifiers |
Gets |
@Nullable TypeBuilders.StringProp |
getText()Gets the text to render. |
@NonNull String |
toString() |
Public methods
getFontStyle
public @Nullable LayoutElementBuilders.FontStyle getFontStyle()
Gets the style of font to use (size, bold etc). If not specified, defaults to the platform's default body font.
getModifiers
public @Nullable ModifiersBuilders.SpanModifiers getModifiers()
Gets androidx.wear.protolayout.ModifiersBuilders.Modifiers for this element.