Lazy loading of images in ListView

爷,独闯天下 提交于 2019-12-31 10:41:12

问题


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?


回答1:


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.




回答2:


Try this, I hope it might help you to resolve your issue

Example 1

Example 2



来源:https://stackoverflow.com/questions/13442920/lazy-loading-of-images-in-listview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!