简体   繁体   中英

How to implement a lazy loaded list of images in a listview

What i am trying to do is toscroll through a list of images. But when i scroll down or up quickly the images are misplaced in order. A diff pic comes in the place where it was supposed to be. I have tried setting the imageview to null drawable from my imageloader library to clear any rpevious images if any. But the issue persists. What should i do

You can try to use Universal image loader

This is for listView optimization and improving performance if your listView contain images from web.

Features:

  • Multithread image loading Possibility of wide tuning ImageLoader's
  • configuration (thread executors, downlaoder, decoder, memory and disc
  • cache, display image options, and others) Possibility of image
  • caching in memory and/or on device's file sysytem (or SD card)
  • Possibility to "listen" loading process Possibility to customize every display image call with separated options Widget support

Finally discovered the culprit. I was using the imageview.bringtofront() function which was causing the problem for some unknown reason. I wanted to put a part of the imageview infront of the other and was using the relative layout & bring to front. Now i removed the bringtofront() and rearranged the imageview in relativelayout so that its already in the front. Resolved. Thank you all

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM