如何在Android软键盘上以编程方式隐藏/禁用表情 [英] How to programmatically hide/disable emoticons on Android soft keyboard

查看:388
本文介绍了如何在Android软键盘上以编程方式隐藏/禁用表情的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以隐藏特定的键盘按钮?我有一个EditText,在某些设备上,它的键盘上有笑脸,而在其他设备上,它上却没有.我想在所有设备上将其隐藏.

Is it possible to hide a specific keyboard button? I have an EditText and on some devices its keyboard has smiley faces while on other devices it is missing. I want to hide it on all devices.

下面是我的EditText的XML:

android:id="@+id/text_editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/send_side"
android:hint="Enter your text"
android:imeOptions="actionSend|flagNoEnterAction"
android:inputType="textLongMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:maxLength="1000"
android:maxLines="3"
android:nextFocusRight="@+id/send_button"
android:padding="12dp"
android:textSize="13sp"

这可能吗?

推荐答案

我在"

您需要从inputType中删除textLongMessage选项.

大多数键盘上仍会带有":-)"按钮,但表情符号上没有.

You will still have the ":-)" button on most keyboards, but not the emoji.

这篇关于如何在Android软键盘上以编程方式隐藏/禁用表情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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