hap 497 wrote:
> Hi,
> 
> I am trying to write a ListAdapter for an android ListView.
> 
> In my ListAdapter's bindView(), I need to read a local file, generate
> a Bitmap and set the imageView of the row to this Bitmap.
> 
> I find this kind of slow when running on G1. Is there any idea to help
> performance?

Cache the images in RAM once you load them, so you do not re-load them
from the file when the user scrolls and then scrolls back. Maybe
pre-load the images if you know what they are in advance and know for
certain they will be used.

You don't want to go overboard on this, lest you run out of memory.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books.html

--~--~---------~--~----~------------~-------~--~----~
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