Everything you need is explained in the documentation. You can use the OnScrollListener to find out when a ListView starts/stops scrolling and you can use getFirstVisiblePosition() and getChildCount() to figure out what items are currently showing.
On Mon, Dec 22, 2008 at 6:48 AM, Brad Gies <[email protected]> wrote: > Can anyone tell me how to detect when a ListView quits scrolling? > > > > And…. On a related note, how would I determine which of the ListView's items > are showing once it does quit scrolling. > > > > For Background : > > I have a ListView that has from zero to 200 items in it. Each item has an > ImageView and a TextView. The Text I'm filling in as it is received, but I > don't want to download the image (they are small bitmaps) unless the user is > looking at that particular item. I've worked out the background thread that > will download the images I need, but I'm stuck on figuring out which images > I need to download, and when J. > > > > It would be nice if there was an OnScrollFinished event… but I can't find it > ;). By the way, I did try just downloading the images in the GetView event, > but it slows down the scrolling and makes it very jerky, so it is not a very > good solution. > > > > I guess another option would be to just start the background thread and just > start at the first item, and keep downloading all images and storing them in > my data class until the GetView calls for them, but that seems like a waste > of resources, and bandwidth because in general the most relevant items are > at the top, and I don't expect the users to get all the way to the bottom of > the list very often. > > > > > > > > Sincerely, > > > > Brad Gies > > > > > > ----------------------------------------------------------------- > > Brad Gies > > 27415 Greenfield Rd, # 2, > > Southfield, MI, USA > > 48076 > > ----------------------------------------------------------------- > > > > Moderation in everything, including abstinence > > > > > > -- Romain Guy Android framework engineer [email protected] 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

