In my app I want to swap images at runtime when user clicks on it.
there are two imageviews when user click on first image and then click on second image at the
use bitmap.recycle(); before valuating your bitmaps to clear their cache before recreating it.
bitmap.recycle();