在ListView的懒加载图像没有得到刷新 [英] Lazy loading images on ListView not getting refreshed

查看:113
本文介绍了在ListView的懒加载图像没有得到刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是包括本code到我的项目从<一个href=\"http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview/3068012#3068012\">an回答堆栈溢出问题的我该怎么做图像的延迟加载中的ListView 的。

I was just including this code into my project from an answer to Stack Overflow question How do I do a lazy load of images in ListView.

我的 <读所有关于它href=\"http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview\">How办图像的延迟加载ListView中

我成功添加到我的项目和图像看起来很好,但他们显示出来,只有当我向上/向下滚动,我的意思是,当列表刷新本身。所以,如果我没有做任何操作(滚动)我一直看到我的默认图片,也没有已经下载的图像。

I added successfully into my project and images seem fine BUT they show up ONLY when I scroll up/down, I mean, when the list refreshes itself. So, If I do not do nothing (scroll) I keep seeing my default image and no the already downloaded image.

任何想法?

推荐答案

在使用ImageLoader的设置图像添加这一行:

Add this line when you set the image using imageLoader:

imageView.setTag(imgURL); \\Add this line
imageLoader.DisplayImage(imgURL,this,imageView);

这篇关于在ListView的懒加载图像没有得到刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆