不强制的EditText只能是数字打开数字键盘 [英] Open a numeric keyboard without forcing the EditText to be numeric only

查看:209
本文介绍了不强制的EditText只能是数字打开数字键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经遇到此同时做工作创造我自己的键盘,但不能为我的生活记得我跑过了。

I've come across this while doing work on creating my own Keyboard but can't for the life of me remember where I ran across it.

我要顶开启数字键盘。不过,我想我的的EditText 来只接受一个I​​P地址。添加一个过滤器,以我的的EditText 是不是太硬感谢这个答案

I want top open the Numeric keyboard. However, I want my EditText to only accept an IP address. Adding a filter to my EditText wasn't too hard thanks to this answer.

不过,现在我想使数字键盘打开,而不是标准的文本键盘。不幸的是搜索结果中都浸透着相同的你怎么限制的EditText 来输入数字?问题一遍又一遍。

However, now I want to make the Numeric keyboard to open rather than the standard text keyboard. Unfortunately search results are saturated with the same "How do you limit EditText to numeric input?" questions over and over.

任何人都可以点我在正确的地方为手动打开数字键盘。

Could anyone point me to the right place for manually opening the Numeric Keyboard.

推荐答案

不知道这是最好的解决办法,但我用安卓inputType =手机

Not sure if this is the best solution, but I use android:inputType="phone".

这篇关于不强制的EditText只能是数字打开数字键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆