I have one TextField
using Jetpack Compose. In that field, I want only Number and Text input. I can apply to only one property at the same time. Like below,
TextField(
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text)
How can I add Text and Number input types?
Code
The type mentioned is to specify keyboard type as the parameter name implies
keyboardType
.You can't show two keyboards at once.
So multiple keyboard types have no meaning.
From your question, I am guessing you want to show the soft keyboard which has both letters and numbers. (Comment below if that is not the case)
Use
KeyboardType.Password
for that.Extras.
KeyboardType.Text.
KeyboardType.Number.
KeyboardType.NumberPassword.