Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lazy loading of images in ListView

I know this is a widely discussed issue, but I'd like to ask a question anyway. I have lists (with BaseAdapters) in my app, all of which obtain images from the web. Now I've tried:

1) AsyncTasks in which the image is downloaded first, stored into a cache, and then displayed on the onPostExecute method. The image is obtained from the cache subsequently.

2) Nostra's Universal Image Loader.

3) Fedor's LazyList. And;

4) Novoda's ImageLoader.

All of these methods claim to make the loading of images "lazy". But the problem is that the scrolling of my list still isn't smooth. It gets stuck and continues when the image completes loading. I've been at this for days now. Does anyone know of a good solution for this problem?

like image 794
Rameez Hussain Avatar asked Nov 18 '12 18:11

Rameez Hussain


People also ask

How lazy loading works in Android?

Lazy image loading means delegating image loading tasks to a ready-made program. You don't need to write the entire code. Once you set up the library, it'll take care of the process for you by initiating an asynchronous load/download process.

What is lazy loading example?

For example, if a web page has an image that the user has to scroll down to see, you can display a placeholder and lazy load the full image only when the user arrives to its location.


1 Answers

By far the easiest libaray I have used which caches images and works really well is AQuery Image Loading Lib. I use it all the time for image loading and caching, really simple.

like image 149
Chris.Jenkins Avatar answered Sep 21 '22 18:09

Chris.Jenkins