I want to show lots of big images(~3-4MiB) in my application just like native gallery app.
I am using ViewPager just for the fancy page-like scrolling and I am providing those images with an PagerAdapter. But after a few scroll, I get OutOfMemoryError. I think that problem raise because of the adapter's behavior that it just keeps previous images in the cache. So what I am trying to do is limit the cache size of that Adapter, say limiting with only 1 image behind the actual image or something to free memory that is occupied by bitmaps that is 2 view behind or forward the actual view. Is there a way to do this? Or is there a better way to handle this problem (with or without adapters) ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en