使用Html.fromHtml设置自定义字样 [英] Using Html.fromHtml to set custom Typeface

查看:106
本文介绍了使用Html.fromHtml设置自定义字样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现这是(据说)支持HTML.fromHtml创建跨区文本的HTML的标签列表:

I found this list of HTML-Tags that are (supposedly) supported for HTML.fromHtml to create a Spanned-Text:

http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html

现在有没有什么办法来设置自定义字样的字体,标签?

Now is there ANY way to set a custom Typeface with the Font-Tag?

推荐答案

没有,有没有办法这样做。您可以<一href="http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/2.1_r2/android/text/Html.java"相对=nofollow>看看的 HTML 实施。正如你所看到的,在字体标签支持尺寸颜色只。

No, there's no way to do so. You can take a look at the Html implementation. As you will see, the font tag supports size and color only.

这篇关于使用Html.fromHtml设置自定义字样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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