Created
November 11, 2016 07:54
-
-
Save kevalpatel2106/bfff4e6726cd93e052ef7ac086fb5b96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UNIVERSAL IMAGE LOADER SETUP | |
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder() | |
.cacheOnDisc(true).cacheInMemory(true) | |
.imageScaleType(ImageScaleType.EXACTLY) | |
.build(); | |
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder( | |
getApplicationContext()) | |
.defaultDisplayImageOptions(defaultOptions) | |
.memoryCache(new WeakMemoryCache()) | |
.discCacheSize(100 * 1024 * 1024).build(); | |
ImageLoader.getInstance().init(config); // Get singleton instance | |
//Now you can load the image | |
ImageLoader.getInstance().displayImage("http://i.imgur.com/DvpvklR.png", (ImageView) findViewById(R.id.ic_uil)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment