1

I've got one issue with otherwise nice working ListView.

I want to load new items into the existing listView, just like in Gmail or Google Play app - I show like 15 items and when the user clicks Load next, the other 15 will be loaded, so we will display like 30 items.

Everything works fine like this, except the ImageView, which is part of the every item in the ListView and is loaded asynchronously. Every time I click load next, all the images in the existing items are reloaded.

How can I avoid this behavior? Any suggestions?

It doesn't really look well, images are loaded from the cache really fast, so it is like a short blicking of all the images.

I was thinking about overriding the notifydatasetchanged() somehow - but I would expect a method in the ListView, in which I could set whether the whole ListView should be reloaded, or just the new items. All the items will fill_parent, so the width is not an issue.

Hawk
  • 392
  • 4
  • 24
  • Do you use any animations for appearence of image? This may be a reason of "blinking". I do full list reload in my app and can't see any problems (pictures comes from cache) – Jin35 Jul 18 '12 at 08:29
  • Have you tried using index..? when you want to load new items save the last index of already loaded items. – Rookie Jul 18 '12 at 08:38
  • Jin35 no, I don't. It's just, the images need to be loaded again and I have my own class to do that. – Hawk Jul 18 '12 at 09:02
  • Raghav can you show me an example? I know, from which index new items should be loaded – Hawk Jul 18 '12 at 09:03

0 Answers0