1SpannableString ss1 = new SpannableString(Html.fromHtml("2H<sup>+</sup> + So<sub size = 2>4</sub><sup size = 2>2-</sup> --> H<sub size =2>2</sub>So<sub size = 2>4</sub>"));
2ss1.setSpan(new RelativeSizeSpan(0.6f), 2,3, 0); // set size
3ss1.setSpan(new RelativeSizeSpan(0.6f), 8,11, 0); // set size
4ss1.setSpan(new RelativeSizeSpan(0.6f), 17,18, 0); // set size
5ss1.setSpan(new RelativeSizeSpan(0.6f), 20,21, 0); // set size
6TempF.setText(ss1,TextView.BufferType.SPANNABLE);