1

I have a regular Gallery widget. For some reason, the getView method in my adapter is getting called once for every single element in my list of items. Effectively creating all the layout elements many more times than necessary and leading to slower loading times as well as outofmemory exceptions.

Reading through several posts I understand that Gallery does not recycle, but I don't think that it should be creating every single item from the get go. Would appreciate any suggestions on how I can prevent all images from being loaded on load.

Leo
  • 4,652
  • 6
  • 32
  • 42

2 Answers2

2

I had the same issue but they way I solved it was related to the component that I use for loading images. Anyway I think this post can be useful for finding a solution

Community
  • 1
  • 1
gwvatieri
  • 5,133
  • 1
  • 29
  • 29
  • I tried using that EcoGallery, but its not nearly as smooth as the real one. Still trying to find a real solution to this, seems like it should just work... – Leo Dec 03 '11 at 00:14
1

So I actually ended up sort of solving this. Using the answer from this question the problem disappeared and the Gallery no longer pre-loads all of the pictures.

I still don't know the cause of the original problem, or the way to solve it there. But this works for me.

Community
  • 1
  • 1
Leo
  • 4,652
  • 6
  • 32
  • 42