Recycle ImageViews to avoid OutOfMemoryError
问题 In some phones (especially Samsungs), the application gives an error of OutOfMemory. I use a ViewFlipper with 4 ImageViews which they are shown in a tutorial. I have found no way to remedy the error or recycle imageviews. This is the method that manages the ViewFlipper: private void changeBackground(int position) { switch (position) { case 1: mViewFlipper.setDisplayedChild(1); mViewFlipper.setInAnimation(getActivity(), R.anim.anim_clockwise_onboarding); mViewFlipper.setOutAnimation