use of me.sheimi.android.avatar.AvatarDownloader in project MGit by maks.
the class SheimiFragmentActivity method setupImageLoader.
private void setupImageLoader() {
DisplayImageOptions mDisplayOptions = new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisk(true).showImageForEmptyUri(R.drawable.ic_default_author).showImageOnFail(R.drawable.ic_default_author).build();
File cacheDir = StorageUtils.getCacheDirectory(this);
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this).defaultDisplayImageOptions(mDisplayOptions).diskCache(new UnlimitedDiskCache(cacheDir)).diskCacheSize(SIZE).imageDownloader(new AvatarDownloader(this)).build();
mImageLoader = ImageLoader.getInstance();
mImageLoader.init(configuration);
}
Aggregations