How to set emoji by unicode in a textview? | Newbedev
文章推薦指數: 80 %
So Textview displays without Drawable. Try it with http://apps.timwhitlock.info/emoji/tables/unicode. You can directly use Emojis in string resources by ...
MenuNEWBEDEVPythonJavascriptLinuxCheatsheetContactNEWBEDEVHowtosetemojibyunicodeinatextview?Foundasolution:
InmyunicodeIreplaced'U+'by'0x'
Example:replace'U+1F60A'by'0x1F60A'
ThiswayIgotan'int'like
intunicode=0x1F60A;
Whichcanbeusedwith
publicStringgetEmojiByUnicode(intunicode){
returnnewString(Character.toChars(unicode));
}
SoTextviewdisplayswithoutDrawable
Tryitwithhttp://apps.timwhitlock.info/emoji/tables/unicode
YoucandirectlyuseEmojisinstringresourcesbyusingthedecimalcodelikethis:
😊
forexample:
延伸文章資訊
- 1android - How to set emoji by unicode in a textview? - OStack.cn
??? unicode = U+1F60A String emoji = getEmojiByUnicode(unicode) String text = "So happy " textvie...
- 2How to Input Unicode - Xah Lee
- 3关于android:如何在TextView中通过Unicode设置表情符号?
How to set emoji by unicode in a textview?嗨,我想做以下事情:[cc]??? unicode = U+1F60AString emoji = getEm...
- 4How to set emoji by unicode in a textview? | Newbedev
So Textview displays without Drawable. Try it with http://apps.timwhitlock.info/emoji/tables/unic...
- 5Display emoji/emotion icon in Android TextView | Newbedev
Why do you want to embed the protected Apple emoji images in your application at all? The Unicode...