Skip to content

Instantly share code, notes, and snippets.

@rdrobinson3
Created June 5, 2013 19:01
Show Gist options
  • Save rdrobinson3/5716282 to your computer and use it in GitHub Desktop.
Save rdrobinson3/5716282 to your computer and use it in GitHub Desktop.
public void init(Context context, String uniqueName, int cacheSize, CompressFormat compressFormat, int quality, CacheType type){
switch (type) {
case DISK:
mImageCache= new DiskLruImageCache(context, uniqueName, cacheSize, compressFormat, quality);
break;
case MEMORY:
mImageCache = new BitmapLruImageCache(cacheSize);
default:
mImageCache = new BitmapLruImageCache(cacheSize);
break;
}
mImageLoader = new ImageLoader(RequestManager.getRequestQueue(), mImageCache);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment