Skip to main content

textAllCaps in Compose

Use KeyboardCapitalization.Characters

Published 1 min readMarkdown
Part of seriesJetpack Compose Tricks

Hello fellow Android nerd.

Are you looking for an alternative of textAllCaps of XML in Jetpack Compose, you are at the right place.

            TextField(
              value = "",
              onValueChange = {},
              keyboardOptions = KeyboardOptions(
                keyboardType = KeyboardType.Text,
                capitalization = KeyboardCapitalization.Characters
              ),
            )

The doc of the Capitalization says this

Happy coding. Subscribe for more Jetpack Compose tricks.

No comments yet. Be the first to comment.

Jetpack Compose Tricks

Part 1 of 1

Bitesize tricks & TILs working with Compose