I am using fromHtml
to display formatted text (bold italic etc) in TextView
. However, I found it's behaviour is different on JellyBean (4.1.2) and KitKat(4.4.2)
Here is code:
String myHtml = "<b>hello</b>😄";
Spanned spanned = Html.fromHtml(myHtml, null, null);
Here html string has 😄
which is unicode for an emoji. Now after calling fromHtml
it returns following value on KitKat (and above):
spanned = hello