将字符串格式化为HTML,然后使用html superscript标记<sup>:
textView = (TextView)findViewById(R.id.textView);
String text = "x<sup>y</sup>";
textView.setText(Html.fromHtml(text));
Run Code Online (Sandbox Code Playgroud)
同样,如果您想要下标,请使用<sub>标记.
| 归档时间: |
|
| 查看次数: |
485 次 |
| 最近记录: |