Skip to main content

Command Palette

Search for a command to run...

textAllCaps in Compose

Use KeyboardCapitalization.Characters

Published
•1 min read•View as Markdown

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.

Jetpack Compose Tricks

Part 1 of 1

Bitesize tricks & TILs working with Compose