How to open the numeric keypad when clicking on EditText?

I read several other posts and used input.setInputType (TYPE_NUMBER_FLAG_DECIMAL); opens a keyboard but not a numeric keypad

+5
source share
3 answers

add android: inputType = "number" to your edittext in your xml, it will automatically open the numeric keypad when you click inside edittext.

+15
source

You just have this code for your xml file,

android:inputType="number" 
+1
source

android:inputType="number" to xml will automatically open the numeric keypad when you press EditText, but this will only allow you to enter character numbers, and if you want to enter other characters, you can try the following:

 android:inputType="number" android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" 
0
source

All Articles