Android EditText:如何避免用户输入表情? [英] Android EditText : How to avoid user enter smileys?

查看:220
本文介绍了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:

如何创建EditText仅在android中接受字母吗?/a>

How to create EditText accepts Alphabets only in android?

这篇关于Android EditText:如何避免用户输入表情?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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