1

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.

I read all about it in How do I do a lazy load of images in 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.

Any ideas?

Community
  • 1
  • 1
ely87
  • 126
  • 5
  • First what is Lazy Loading as your point of view ?? – Nirav Ranpara Oct 22 '12 at 12:19
  • Lazy loading downloads all my images on my adapter without blocking UI Thread and lagging my list and it gives me the possibility to reuse them without downloading them twice. So my problem is that everything seems OK but I need to scroll and hide the image in order to see them (visually) – ely87 Oct 22 '12 at 12:31
  • that code is working fine.........you must have done some changes which is making that thing happen to you.. – maninder singh Oct 22 '12 at 12:59
  • I did not modify the code. That's why I want to know if there may be some other reason. Perhaps it's because I'm using ArrayAdapter instead of BaseAdapter? I think that should not mind, right? – ely87 Oct 22 '12 at 14:53

1 Answers1

0

Add this line when you set the image using imageLoader:

imageView.setTag(imgURL); \\Add this line
imageLoader.DisplayImage(imgURL,this,imageView);
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
AndroidLearner
  • 4,500
  • 4
  • 31
  • 62