标和上标在Android中的String上标、Android、String

2023-09-12 00:10:43 作者:年少德、无知

您如何打印字符串与标或上标?你可以这样做,无需外部库?我想这在的TextView Android中显示。

解决方案

((TextView)findViewById(R.id.text)).setText(Html.fromHtml("X<sup>2</sup>")); Ai中怎样标上标

常见任务和如何做他们的安卓

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

 
精彩推荐
图片推荐