androidx.glance.text

Classes

FontFamily

Describes the family of the font.

FontStyle

Describes the style of the font: Normal] or Italic.

FontWeight

Weight of a font.

TextAlign

Defines the alignment of the text in its view.

TextDecoration

Defines a horizontal line to be drawn on the text.

TextStyle

Description of a text style for the androidx.glance.text.Text composable.

Objects

Top-level functions summary

Unit
@Composable
Text(text: String, modifier: GlanceModifier, style: TextStyle, maxLines: Int)

Adds a text view to the glance view.

Top-level functions

Text

@Composable
fun Text(
    text: String,
    modifier: GlanceModifier = GlanceModifier,
    style: TextStyle = defaultTextStyle,
    maxLines: Int = Int.MAX_VALUE
): Unit

Adds a text view to the glance view.

Parameters
text: String

The text to be displayed.

modifier: GlanceModifier = GlanceModifier

GlanceModifier to apply to this layout node.

style: TextStyle = defaultTextStyle

TextStyle] configuration for the text such as color, font, text align etc.

maxLines: Int = Int.MAX_VALUE

An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated.