How do I default to numeric keyboard on EditText without forcing numeric input? [duplicate]

Add the following line of code, and it will do the trick 🙂

editText.setRawInputType(Configuration.KEYBOARD_QWERTY);

This will show the the numeric keypad first, but also allows you to enter free text.

More information here.

Leave a Comment