Android Jetpack Compose – Text

Text composable function is used to display text in Android application.

The most basic example to define a Text composable with a string to display text is as shown in the following.

Text("Hello World")

We can also style this text, using optional parameters that Text composable provide.

For example, to change the color of the text, set color parameter to a Color value, as shown in the following.

Text("Hello World", color = Color.Blue)

As simple as that.

The following is a list of tutorials, that cover styling and how-to concepts with Text composable.

Basic tutorials on Text Composable

ADVERTISEMENT

Text Styling

Conclusion

In this Android Jetpack Compose Tutorial, we learned what Text composable is, and how to style the text of a Text composable, with the help of individual tutorials for each concept.