Android TextView with HTML & separator

后端 未结 3 828
感动是毒
感动是毒 2021-02-11 02:47

I have a TextView that is part of a ListView row item. In that TextView, i have some HTML rendered using Html.fromHtml(). I\'m wondering if there is a way to do what is effect

3条回答
  •  囚心锁ツ
    2021-02-11 03:35

    As you can see in the Html class source code, Html.fromHtml(String) does not support all HTML tags. This is a list of allowed HTML tags:

    • br
    • p
    • div
    • em
    • b
    • strong
    • cite
    • dfn
    • i
    • big
    • small
    • font
    • blockquote
    • tt
    • monospace
    • a
    • u
    • sup
    • sub

    So, why don't just use a WebView instead of a TextView?

提交回复
热议问题