Is it possible to catch offline using universal image loader?
If possible, how to use it?
Using configs?
How To Set Download Directory manually?
out of memory erroron load huge images :
my codes :
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
.cacheOnDisc(true).cacheInMemory(true)
.imageScaleType(ImageScaleType.IN_SAMPLE_INT)
.displayer(new FadeInBitmapDisplayer(300)).build();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(G.appConfigs.context)
.defaultDisplayImageOptions(defaultOptions)
.memoryCacheExtraOptions(480, 800) // default = device screen dimensions
.diskCacheExtraOptions(480, 800, null)
.memoryCache(new WeakMemoryCache())
.memoryCache(new LruMemoryCache(2 * 1024 * 1024))
.memoryCacheSize(2 * 1024 * 1024)
.discCacheSize(300 * 1024 * 1024)
.build();
ImageLoader.getInstance().init(config);
// END - UNIVERSAL IMAGE LOADER SETUP
ImageLoader imageLoader = ImageLoader.getInstance();
DisplayImageOptions options = new DisplayImageOptions.Builder().cacheInMemory(true)
.cacheOnDisc(true).resetViewBeforeLoading(true)
.showImageForEmptyUri(R.drawable.no_pic)
.showImageOnFail(R.drawable.load_failed)
.showImageOnLoading(R.drawable.img_thumb).build();
//download and display image from url
imageLoader.displayImage(imgURL, img, options);
how to resolve it ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…