0

In a GridView I should display several images. All the images are downloaded from the internet. All this functionality is already done and works like a charm, but at some point you realize this is not the best implementation.

Consider the GridView has several hundreds of images. In this case I would like to download only those images, that are visible to the user, or fits in the visible area of the screen.
If I scroll down the gallery, I want to cancel (if any) the previous started downloads, and start downloading the images that are visible to the user.

Could you suggest me some hints how I would go implementing this?

Or suggest some libraries. Right now I'm looking at Ignition, but it seems it loads all the gallery at once.

Andy Res
  • 15,963
  • 5
  • 60
  • 96

1 Answers1

0

If I understand you correctly, you're describing lazy loading. There's a question about this with great answers. In a simple case I used Fedor's library, which works great. A more complex solution is offered by NOSTRA.

From what I've seen, UniversalImageLoader does exactly what you would want it to do. It can be found here on github.

Community
  • 1
  • 1
Vic V
  • 1,080
  • 2
  • 12
  • 31