在Android上显示表情符号键盘? [英] Show Emoji Keyboard On Android?
问题描述
所以我正在构建一个Android应用程序.我使用了自定义的emojicon包,其中包含与iOS相似的emoji表情.但是,我注意到KitKat带有本机表情符号支持,因此,如果用户拥有KitKat,我想向用户显示此内容,而不是向我的自定义窗口显示.如何在不更改imeOptions的情况下显示特定的键盘窗口?
so I am building an Android app. I have used a custom emojicon pack that comes with emojis that look like the iOS ones. However, I've noticed that KitKat comes with native emoji support, so I want show that to users instead of my custom window if they have KitKat. How do I show a certain keyboard window, without changing the imeOptions?
我尝试了mEditText.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_PICTSYMBOLS))
,但这似乎并没有解决问题
I tried mEditText.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_PICTSYMBOLS))
, but that didn't seem to do the trick
推荐答案
将此属性放入您的edittext
put this properties in your edittext
android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:imeOptions="actionSend|flagNoEnterAction"
检查android stock sms应用程序源
check the android stock sms app source
这与swiftkey和Google键盘一起使用
this work with swiftkey and google keyboard
这篇关于在Android上显示表情符号键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!