Type of android keyboard, text and number

Asked

Viewed 541 times

4

There’s how I make the android keyboard stay with two types, in case I wanted numbers and letters. I tried using android:inputType, but it didn’t work. Do you already have a way to solve this?

Thank you.

RESOLVED

Looking deeper into the problem, I realized that the problem was not the type of keyboard, but the mask of input, everything that was typed, in the class of the mask he called the setText() causing the keyboard to return to the standard, then instead of setText(), I used the following:

ediText.getText().clear();
ediText.append(mascara.toUpperCase());

Thank you all.

  • The Alfanumerico keyboard that appears does not solve? Just press the specific key that changes to numbers and symbols.

  • The problem is that when I change the type of keyboard, I click on a number it goes back to the previous type, maybe it can be a mask I’m using in input, then when I use setText, it goes back to the previous type.

1 answer

3

Try the following:

android:inputType="textCapCharacters"

According to the documentation:

Can be combined with text and its variations to request capitalization of all characters.

Follow the link from documentation

Greetings

Browser other questions tagged

You are not signed in. Login or sign up in order to post.