How to display emoticons / emoji in a diner or toast / text image

I am trying to add emoticons / emoji in the Snackbar / Toast notification. These emoticons must have an image resource or Unicode character. I get line output when I use the Unicode character from the following website. Unicode personal site .

Snackbar.make(findViewById(android.R.id.content), \U+1F601 + "Done", Snackbar.LENGTH_LONG).show(); 
+7
android unicode toast android-snackbar
source share
1 answer

After cross-referencing Supported Unicode sequences as well as Visual Unicode databases, I realized that \ u1F601 is a 32-bit Unicode representation, and a 16-bit representation can be set as follows:

 Toast.makeText(this, "Smileys = " + ("\ud83d\ude01"),Toast.LENGTH_LONG).show(); 

Change the last digit ("\ud83d\ude01") unicode to change the emoticon

Refer to these links

http://apps.timwhitlock.info/emoji/tables/unicode#note1

http://www.charbase.com/1F601

+12
source share

All Articles