How to set emojis like WhatsApp chat instead of mo

2019-06-18 16:36发布

问题:

I'm working on one project in that I export WhatsApp chat and set in TextView. Emojis used in chat is actual WhatsApp emojis but when I set in TextView it shows as Android emojis depends on the device.

Question: how to set whats app emojis in TextView?

Try: all I can find is how to make custom keyboard and libraries for custom keyboard**(i don't want to make custom emojies keyboard, unless that's the only option)** but I'm not sending any data. I'm just getting data and set in TextVeiw I'm wondering if anybody can guide. ,

回答1:

Emoji is Unicode just like any other character, that's why it's displaying system emojis even when you are using the WhatsApp messages in TextView. To display custom emojis like WhatsApp you have to implement it yourself. Check out this library it may help.

Some other libraries: Emoji Emoji Keyboard

Also, take a look at Android Emoji Compatibility Library

Even if you are not trying to send data, you can use these libraries to just display text and emojis with their respective custom TextView.



回答2:

These are the Library Url's you can use one of them

  1. https://github.com/edsilfer/emoji-keyboard
  2. https://github.com/ankushsachdeva/emojicon
  3. https://github.com/rockerhieu/emojicon
  4. https://github.com/chiragjain/Emoticons-Keyboard


回答3:

First of you need to design your own emojis for your app and then replace it with the system emoji unicode so when user types Android default emojis then it will be replaced by your custom emojis. Check this link for how it works