I have a ViewFlipper loaded with ImageViews (about 24) which are screenshots for the app, as a user guide. The user would bring up this activity, and flip through the images to see how the app works.
Unfortunately, it’s crashing on phones and emulators due to too much memory from loading up all of the images(my first design was tested on a nook Color running Honeycomb) running 2.2 and 2.3 (which I am required to support).
Can you suggest a code design alternative to limit the amount of memory required? Loading a few images at once, nulling images, alternative compression or format, etc?
Thanks
use a
GalleryorViewPagerwith aPagerAdapter(new! included in compatibility package). thePagerAdapterwill destroy/create each page when it needs to. You can re-use views using aGalleryin a custom adapter.see http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html