In the name of performance which is better to use list of webview objects with custom array adapter defined or list of textview object again with custom adapter and html content
As a perfromance comparison ,I tried both of them but WebView with huge data is incredibily slow , my custom adapter could not even finish drawing until user respond to interface on the other hand textview is doing pretty good as a performance , i recommend using textview unless you need to do lots of html work inside text.
WebView
does not work well as a child of ListView
, since both WebView
and ListView
know how to scroll. Hence, I would use TextView
. Limit your HTML to the tags that Html.fromHtml()
supports. Here is a list of supported tags from Android 2.1, and other versions of Android are probably similar.
With respect to performance, TextView
is indeed a significantly lighter widget and would perform better in any case. You may want to cache your Html.fromHtml()
output, though, so you do not have to re-do that for a given row as the user scrolls.