[android-developers] Re: Lazy-load images into a ListView

2009-07-12 Thread Christine
My app loads new data like every four minutes, and if the pic is not there in time, too bad, you'll have it in the next round. What you can do is if the hashmap returns null, subsitute a default pic, which I gues you have to do because you'll probably have a recycled view which already contains a

[android-developers] Re: Lazy-load images into a ListView

2009-07-12 Thread Mark Murphy
Christine wrote: > What if you have the listview load the images from a hashmap, and have > a separate process fill the hashmap in the background? That's effectively what I'm doing, but you still need to tell the ListView when images are ready to be loaded out of the HashMap. That's for the case

[android-developers] Re: Lazy-load images into a ListView

2009-07-12 Thread Christine
What if you have the listview load the images from a hashmap, and have a separate process fill the hashmap in the background? On Jul 12, 3:47 pm, Evan Charlton wrote: > Mark, > > Thanks for the reply! > > > -- If you scroll enough before the image is done loading, and the row is > > recycled f

[android-developers] Re: Lazy-load images into a ListView

2009-07-12 Thread Evan Charlton
Mark, Thanks for the reply! > -- If you scroll enough before the image is done loading, and the row is > recycled first, you'll get weird results (image will keep flipping to > different pictures as its various tasks complete) Even if I never scroll, the results are still jumbled and/or duplica

[android-developers] Re: Lazy-load images into a ListView

2009-07-12 Thread Mark Murphy
Evan Charlton wrote: > I will be surprised if this hasn't been asked before, but I've been > Googling for days now and haven't found anything very helpful. My > problem is this: > > I'm trying to lazy-load images into a ListView--almost exactly how > Market does it, if you're familiar with that.