How do I show the number keyboard on an EditText in android?
Solution 1:
You can configure an inputType
for your EditText
:
<EditText android:inputType="number" ... />
Solution 2:
To do it in a Java file:
EditText input = new EditText(this);
input.setInputType(InputType.TYPE_CLASS_NUMBER);