更改上标文本的字体 [英] Change font of superscript text

查看:70
本文介绍了更改上标文本的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个需要显示上标数据的视图.我正在遵循来实现这一目标.

I am writing an view where I need to display superscript data. I am following this to achieve this.

沿此方法可以更改上标文本的字体大小(以数字表示).

Along this is there any way to change font size(in number) of superscript text.

编辑Commanware建议链接可以很好地工作,除了一件事.我需要基础文字上方的上标.我正在更新图像,请参考.我使用的是参考代码中提到的相同代码.

EDIT Commanware suggested link work great, except one thing. I need superscript bit above of base text. I'm updating image for same, please refer. I'm using same code with mention in reference code.

这里要么可以进入单独的文本视图,要么可以作为第二优先解决方案.有任何建议!

Here either can go for separate text view could be second priority solution. Any suggestion !

推荐答案

尝试使用这是可行的代码:

try this one this is working code:

((TextView)findViewById(R.id.text)).setText(Html.fromHtml("04:30<sup><small>pm</small></sup>"));

这篇关于更改上标文本的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆