在Android中使用标 [英] Using superscript in Android
本文介绍了在Android中使用标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在我的Android应用程序用数学符号。
有没有比实现例如2 ^ 32的其他电源符号没有更好的办法..?
我的意思是,如果我想使用2个电源32没有任何标实施Android SDK中还是应该使用2 ^ 32本身..?
谢谢
Am trying to use mathematical notations in my android app. Is there any better way to implement the power notation other than for example 2^32..? I mean if I want to use 2 power 32 is there any superscript implementation in android sdk or should I use 2^32 itself..? Thanks
推荐答案
您可以使用Html.fromHtml格式化字符串的某些部分在一个TextView
You can use Html.fromHtml to format some portions of strings in a TextView
myTextView.setText(Html.fromHtml("2<sup>32</sup>"));
会写:2 32
支持的标记为 Html.fromHtml <列表/ A>
List of supported tags for Html.fromHtml
这篇关于在Android中使用标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文