Using WebViews inside a ListView is a bad idea. We tried :) The
biggest problem is that when you load data inside a WebView, it takes
some time to do the parsing/layout and it happens that it is too slow
in the case of scrolling a ListView.

As for the scrollbars, Cupcake has a solution for it. There is a new
attribute for ListView telling it to disable smooth scrollbars; that's
what you want when the items have (very) different heights.

On Sun, Feb 15, 2009 at 12:47 PM, Chister Nordvik <cnord...@gmail.com> wrote:
>
> I am showing a RSS feed in my application using Webview as ListItem
> and it works great except that it is very sluggish at times. Since I
> don't know the size of the content then I can't set the height of each
> Webview and therefore I have the following code (this is the code for
> a single ListItem):
>
> <WebView android:id="@+id/rss_title"
>        android:layout_width="wrap_content"
>        android:layout_height="wrap_content"
>        android:layout_weight="1"
>        style="@style/RssText"
>        android:textColor="#FFFFFF"
>  />
>
> But the "wrap_content" causes the Webview to readjust size when
> scrolling. The scrollbar-indicator of the listview also has problems
> knowing the size of the complete list so it changes size when
> scrolling. All this causes a very "jerky" experience when scrolling.
>
> Is there any better way of doing this? Would really appreciate any
> help!
>
> -Christer
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to