I’m implementing an Android App and I need a tip. My
EditText, usually, is just numbers, but sometimes numbers and letters.
This is the keyboard that I need as “default”, when the
EditText is focused:
If I put
android:inputType="number", the result isn’t what I need:
I need numbers and letters. So, is it possible to do? I already tried EVERY
inputType. I try to “mix” some
number | text, but nothing changes.
If you want a general keyboard you can use this:
This will allow you to use default keyboard with all the special characters, numerics and alphabets one needs.
Looking at the date when this question was asked no doubt it was a hassle to feed the type of keyboard desired. Anyways, if you are still tracking this question. Here’s the answer.
<EditText android:inputType="number" ... />
Above code must need 1.5 or up version
if its not working also try
EditText num = new EditText(this); num.setInputType(InputType.TYPE_CLASS_NUMBER);