如何从Android小键盘中为EditText排除特殊字符 [英] How to exclude special characters from android keypad for EditText
本文介绍了如何从Android小键盘中为EditText排除特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在Android的EditText键盘上仅显示数字和字符,我确实尝试添加属性android:inputType = text|number
,但是它不起作用.
Hi I want to show only numbers and characters on the keypad for EditText in android, I did try to add the attribute android:inputType = text|number
but it did not work.
如果有其他更好的建议,请帮助我.预先感谢.
Please help me with any other better suggestion. thanks in advance.
推荐答案
尝试将digits参数添加到您的editText:
try to add the digits parameter to your editText:
android:digits="abcde.....012345789"
这篇关于如何从Android小键盘中为EditText排除特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文