Hi I'd like to do the following:
??? unicode = U+1F60A
String emoji = getEmijoByUnicode(unicode)
String text = "So happy "
textview.setText(text + emoji);
to get this in my textview:
So happy
Hi I'd like to do the following:
??? unicode = U+1F60A
String emoji = getEmijoByUnicode(unicode)
String text = "So happy "
textview.setText(text + emoji);
to get this in my textview:
So happy
Found a solution:
In my unicode I replaced 'U+' by '0x'
Example: replace 'U+1F60A' by '0x1F60A'
This way I got an 'int' like
Which can be used with
So Textview displays
NOte: For Kotlin
You can directly use Emojis in string resources by using the decimal code like this:
for example:
NOTE: The x is required in android vs standard XML escape sequences.