views:

151

answers:

1

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 effectively an <hr> tag within the html so that it'll render a horizontal line in between 2 items within the TextView. is this even possible?

thx Ben

+1  A: 

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?

Cristian
I*'ll try the WebView, but last time i tried it, the performance was a bit laggy whereas the textvie would load up much quicker...
Ben