如何显示在TextView的Android中
答
你可以使用spannable。
TextView textView;
textView.setText(Html.fromHtml("x<sup>3</sup> + x<sup>2</sup> + x = c"));
另一种方法是使用UTF-8连同能够UTF-8的字体,你可以简单地使用UTF-8字符标。与上标字符的表格可以在这里找到:http://www.unicode.org/charts/直接链接到表上标为:http://www.unicode.org/charts/PDF/U2070.pdf
答
可以使用<sup>
和<sub>
标签在XML做这件事。 看看这个: http://thinkandroid.wordpress.com/2009/12/28/quickly-add-superscript-subscript/
谢谢城市。我只是想出了它。 –