Yes and lists can be scrolled quickly so many of the images locations
may scroll away even before they are loaded. I'd maybe want to make
sure the images to be loaded are small like thumbnails if possible in
order to speed load time and decrease memory footprint.

Otherwise you might want to not load the images in the list but have
them pop-up on a long-click on a list element of something. Maybe?

On Sep 18, 9:41 pm, hap 497 <hap...@gmail.com> wrote:
> Thank you.
>
> In my adapter's bindView method(), can I do something like only bind
> the text parts of the view first and spawn a thread to bind the
> imageView (i.e. loading the bitmap form file, create a bitmap object
> and call setImageBitmap to the imageView)?
>
> But one problem I see this is I will end up spawning 1 thread per row
> in ListView, so that is kind of expensive. My ListView can ~ 50 rows.
>
>
>
> On Fri, Sep 18, 2009 at 4:37 PM, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > 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- Hide quoted 
> > text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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