I am parcing data from an XML file which has subscript and superscript characters in them which i got from the character map. Like so:
H₂
but when i display it on a textview in android it gives me this 'Hâ,,'
how can i fix this and display it properly in my app?
解决方案
I found out how
In the XML file the code should be like this :
H<sub>2</sub>
So that the parced string value is "H2"
then in the java code :
TextView textview.setText(Html.fromHtml(YourString);
and for superscript use "sup" instead of "sub"