[英]Using numeric keyboard on EditText in android studio
I'm using an EditText in my android app, and I want a numeric keyboard to show when I tap and try to edit it.我在我的 android 应用程序中使用 EditText,我希望在点击并尝试编辑它时显示数字键盘。
There are two easy ways to do it, add one of the following to EditText block in XML file:有两种简单的方法可以做到这一点,将以下之一添加到 XML 文件中的 EditText 块:
android:inputType="phone"
android:digits="1234567890"
android:inputType="number"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.