Display emotion icon in Android TextView using Unicode characters or other way

I am trying to create a chat application for Android. Here I want to show the emotion icon in the form of an android.

I want to show Emotion Icon like this.

enter image description here

I found one project in github :: https://github.com/sharakova/EmojiTextView . Here is the image in drawable, but I am not using an image. I want to use Unicode characters. So, how to show the Emotion icon using Unicode characters.

Someone will tell you to use Spannable Text, but this will slow down my application. when many emotion chat icons are used.

So, here is any way to show the Emotion icon in android Text-view ?.

Thanks.

+4
source share
2 answers

1) find the UTF-8 character for your emotions For example, http://www.fileformat.info/info/unicode/char/263a/index.htm

2) enter into the text value of the field "C / C ++ / Java source code" relative to the link above for a smile, this is "\ u263A"

+3
source

You can use EmojiconTextView or EmojiconEditText from this library: https://github.com/rockerhieu/emojicon

0
source

Source: https://habr.com/ru/post/1482889/


All Articles