How do I show the number keyboard on an EditText in android?

Chiwai Chan picture Chiwai Chan · Jul 13, 2009 · Viewed 166.7k times · Source

I just basically want to switch to the number pad mode as soon a certain EditText has the focus.

Answer

Josef Pfleger picture Josef Pfleger · Jul 13, 2009

You can configure an inputType for your EditText:

<EditText android:inputType="number" ... />