展会< UL> <立GT;在android系统的TextView [英] Show <ul> <li> in android textview

查看:116
本文介绍了展会< UL> <立GT;在android系统的TextView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在它与UL字符串和李。而且我想向他们展示在TextView的HTML格式。
textView.setText(Html.fromHtml(myHtmlText));

但是TextView中显示的纯文本。我怎么可以在TextView中格式化UL和李标签?

I have String with ul and li in it. And I am trying to show them in HTML formatting in textview.
textView.setText(Html.fromHtml(myHtmlText));
But textview shows the plain text. How can I have the ul and li tags formatted in textview?

推荐答案

看的 HTML支持通过TextView的代码两者的 UL 标签不被支持的 android.text.Html 类。

see HTML Tags Supported By TextView both ul and li tags are not Supported by android.text.Html class.

解决方案:您可以使用的WebView显示这些标签或通过 TagHandler

有关更多帮助看到这个帖子:

for more help see this post:

<一个href=\"http://stackoverflow.com/questions/3150400/html-list-tag-not-working-in-android-textview-what-can-i-do\">Html列表标签在Android中的TextView不工作。我能做些什么?

这篇关于展会&LT; UL&GT; &LT;立GT;在android系统的TextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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