LayoutElementBuilders.SpanText


@RequiresSchemaVersion(major = 1, minor = 0)
class LayoutElementBuilders.SpanText : 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

Builder for SpanText.

Public functions

LayoutElementBuilders.FontStyle?

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

ModifiersBuilders.SpanModifiers?

Gets androidx.wear.protolayout.ModifiersBuilders.Modifiers for this element.

TypeBuilders.StringProp?

Gets the text to render.

String

Public functions

getFontStyle

Added in 1.0.0
fun getFontStyle(): LayoutElementBuilders.FontStyle?

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

getText

Added in 1.0.0
fun getText(): TypeBuilders.StringProp?

Gets the text to render.

toString

fun toString(): String