InputType of EditText in Android

有些话、适合烂在心里 提交于 2019-12-25 03:38:14

问题


I want to use default keyboard for, but want also that it occurs with numeric input type.

Does anybody know how to do that?

Maybe there is a way to press '?123'-key programmatically?

I've took a look to list of inputTypes, but none of them seems to be the proper one for my need.

Thank you


回答1:


You can use either of these 3:

For example: android:inputType="numberDecimal"




回答2:


set in ur code inputType = "number"



来源:https://stackoverflow.com/questions/4931494/inputtype-of-edittext-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!