How to open numeric keyboard when click on EditText?

Nipun Gogia picture Nipun Gogia · Dec 12, 2012 · Viewed 16.3k times · Source

I read several other posts and using input.setInputType(TYPE_NUMBER_FLAG_DECIMAL); does open the keyboard but its not the numeric keyboard

Answer

Android Killer picture Android Killer · Dec 12, 2012

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