I found out how
In the XML file, the code should look like this:
<value column="Back" null="false">H<sub>2</sub></value>
Thus, the value of the string with the character "H<sub>2</sub>" then in the java code:
TextView textview.setText(Html.fromHtml(YourString);
and for superscript instead of "sub"
use "sup"
source share