Android EditText:如何避免用户输入表情? [英] Android EditText : How to avoid user enter smileys?
本文介绍了Android EditText:如何避免用户输入表情?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想避免用户将键盘上的笑脸放入EditText
中.有可能吗?
I would like to avoid to the user to put a smiley with the keyboard into an EditText
. Is it possible ?
推荐答案
您可以定义输入类型,仅接受字母或更改键盘类型:
You can define your input type and only accept letters or change your keyboard type:
https://developer.android.com/training/keyboard-input/style.html
或者您只能接受某些特定的数字:
Or you can only accept some specific digits:
How to create EditText accepts Alphabets only in android?
这篇关于Android EditText:如何避免用户输入表情?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文