My code is as follows.
textView.setText(Html.fromHtml("6<sup>4</sup>"));
The output is:
Now I want to change the size of 4, so I applied the font as follows, but font is not getting applied.
textView.setText(Html.fromHtml("6<sup><font size="-2">4</font></sup>"));
How do I fix this problem?
According to android.text.Html (on GrepCode), you may use <small>
for smaller text, as <font>
only supports color and face attributes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With