My Application gets images by json/url and populate a ListView along some TextViews. On each item click a new details_activity is open with an ImageView to display the image from the row. Then I open this image from ImageView in a new activity with fullscreen size.
My question is: Do I need to use the Universal Image Loader code below on all activities mentioned above?
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder() .cacheInMemory(true).cacheInMemory(true) .imageScaleType(ImageScaleType.EXACTLY) .displayer(new FadeInBitmapDisplayer(300)).build(); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder( getApplicationContext()) .defaultDisplayImageOptions(defaultOptions) .memoryCache(new WeakMemoryCache()) .diskCacheSize(52428800).build(); ImageLoader.getInstance().init(config); What is happening is that sometimes I get out of memory error displaying fullscreen images. But if I return to details_activity and then click again on image, it opens with no error in fullscreen_activity, even if I use the code above on all activities that use imageloader.