简体   繁体   中英

problem with lazy loading in android

i have done lazy loading in my one of activity lazy loading is running perfectly but first time when my screen the second and third position of list is empty but when i scroll the list all items are listing completly in list

i attached screenshot Please give me some advice! This is the screen when Activity is loading

Yeah, this is because, you are downloading the images in a separate thread. So it will eventually take time to download images one by one. And as the thread download's your images one by one it will update your ListView with the downloaded images. This is the concept of Lazyloading. And as they are being downloaded you are storing it in a cache directory too(if I am right). So unless your image is downloaded you will not be able to see a image in your ListView which is a known fact.

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