简体   繁体   中英

Show Emoji Keyboard On Android?

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?

I tried mEditText.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_PICTSYMBOLS)) , but that didn't seem to do the trick

put this properties in your edittext

 android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
 android:imeOptions="actionSend|flagNoEnterAction"

check the android stock sms app source

https://raw.github.com/android/platform_packages_apps_mms/master/res/layout/compose_message_activity.xml

this work with swiftkey and google keyboard

find the EmojiEverywhere which will help to implement emoji. Emoji in TextView, EditText for Android (like Android KitKat Emoji Keyboard)

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM