0

I've a ListView in which each row item contains many ImageViews apart from some content.

That is, there will be many list items, each containing many images.

In order to not to hold user unnecessarily, I'm showing the content first & then downloading the images asynchronously.

Currently, for each image I'm starting a new AsycTask. Although, it working alright, but this not a good approach.

In place of this, what should I use?

reiley
  • 3,759
  • 12
  • 58
  • 114

3 Answers3

0

use this library, best in android for image loading.. https://github.com/nostra13/Android-Universal-Image-Loader

Karthik
  • 2,282
  • 2
  • 22
  • 23
0

Your scenario seems to fit exactly to use LazyLoading of images. This basically loads images in the background and shows them as soon as they're loaded.

You might want to see this:

An alternative would be using a ThreadPoolExecutor with the images to load, but the above works pretty well and is recommended.

Community
  • 1
  • 1
nKn
  • 13,691
  • 9
  • 45
  • 62
0

Try using the library http://square.github.io/picasso/

Many common pitfalls of image loading on Android are handled automatically by Picasso:

Handling ImageView recycling and download cancelation in an adapter. Complex image transformations with minimal memory use. Automatic memory and disk caching.

Pavandroid
  • 1,586
  • 2
  • 15
  • 30