views:

29

answers:

1

Is it a good idea to put a WebView into each item of a ListView on Android? Or should I just use the TextView with Spannd?

I tried the Html.fromHtml() with ImageGetter to get the Spanned, but it does lots of parsing works for you and hard to customize it. And also it's different from what you see on a WebView.

Any idea would be helpful. Thanks.

A: 

You can use WebViews in ListView elements, if you absolutely need to. Afaik, the only problem with this solution is, that it takes a relatively long time for ListView to measure the height of the list elements which have WebViews. But if you tested it, and it worked alright, then it's good to go I think.

Scythe
Thanks, and I tried the WebViews on my ListView. It is obviously slow on creating the ListView and seems ok after the reusable convertViews start doing their jobs.
shiami
But I think I won't put them in my ListView due to the performance issue.
shiami