Sunday, January 22, 2012

[android-developers] Delayed modification of ListView row causing a rebuild of the entire list when scrolling

I've got a ListView that I am populating with a list of videos from my server.  For each row I'm showing the title, a thumbnail, and some additional information.  The thumbnail is being loaded from a URL and the loading of the thumbnail is being done off of the main UI thread.  When the thumbnail is loaded I am setting the ImageView using setImageBitmap.  My problem is that modifying the row after it has been initially drawn in the list is somehow setting the ListView into a state where it thinks it needs to rebuild everything when scrolling.  This is causing some major sluggishness.  By caching the thumbnails in memory I can minimized the effect this has by calling setImageBitmap directly from getView, but it is still very sluggish on the first time viewing the list.  Is this the expected behavior?  Is there something I can do to keep this from happening?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate