I read several other posts and using input.setInputType(TYPE_NUMBER_FLAG_DECIMAL); does open the keyboard but its not the numeric keyboard
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
add android:inputType="number" to your edittext in your xml, it will automatically open numeric keyboard when you will click inside edittext.
回答2:
Just you this code for your xml file,
android:inputType="number"
回答3:
Add android:inputType="number"
in xml will automatically open numeric keyboard when click on EditText, but this will allow you to enter characters only numbers, and if you wanna enter other characters, you may try this:
android:inputType="number"
android:digits="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"