标和上标在Android中的String [英] Subscript and Superscript a String in Android
本文介绍了标和上标在Android中的String的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您如何打印字符串与标或上标?你可以这样做,无需外部库?我想这在的TextView
Android中显示。
解决方案
<$p$p><$c$c>((TextView)findViewById(R.id.text)).setText(Html.fromHtml("X<sup>2</sup>"));
或
How can you print a string with a subscript or superscript? Can you do this without an external library? I want this to display in a TextView
in Android.
解决方案
((TextView)findViewById(R.id.text)).setText(Html.fromHtml("X<sup>2</sup>"));
or
Common Tasks and How to Do Them in Android
这篇关于标和上标在Android中的String的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文