我有一个 EditText
我只想在其中插入整数值。谁能告诉我我必须使用哪个属性?
最佳答案
添加 android:inputType="number"
作为 XML 属性。
关于android - 您如何将 EditText 设置为仅接受 Android 中的数值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4645119/
我有一个 EditText
我只想在其中插入整数值。谁能告诉我我必须使用哪个属性?
最佳答案
添加 android:inputType="number"
作为 XML 属性。
关于android - 您如何将 EditText 设置为仅接受 Android 中的数值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4645119/
相关文章:
android - listView 中的自定义 alertDialog
android - Cordova 3.4 和 Android 4.1 上的 Bootstrap 选择问题
android - TextInputEditText 中的 OnClickListener 包裹在 TextInputLayout 中
java - 从 edittext 获取用户输入,输入正确后立即更改 textview (Android)
android - 更改 EditText.setError(String) 的样式
android - NestedScrollView 的 smoothScrollTo() 行为怪异