Sort of:
TextView t = (TextView) findViewById(R.id.text);
t.setText(Html.fromHtml("7<sup>2</sup>"));
According to Android documentation about your frequently asked questions, you can always do this using a string resource, but if you do this on the fly, you need to make sure TextView uses Spannable storage (always true if it's EditText, for example).
See Selecting, highlighting, or styling parts of text in Android Common Tasks .
source
share