0Pricing
Jetpack Compose Academy · Lesson

AnnotatedString: Rich Mixed Text

Style spans within a single Text block.

One Text, Many Styles

Sometimes one word in a sentence needs to stand out. AnnotatedString lets you style spans inside a single Text composable.

Why Not Two Texts

You could split words into separate Texts, but they would wrap awkwardly. AnnotatedString keeps everything as one flowing, naturally wrapping line.

All lessons in this course

  1. The Text Composable
  2. Font Size, Weight & Style
  3. Color, Alignment & Overflow
  4. AnnotatedString: Rich Mixed Text
← Back to Jetpack Compose Academy