Search in sources :

Example 1 with AvatarDownloader

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);
}
Also used : UnlimitedDiskCache(com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache) AvatarDownloader(me.sheimi.android.avatar.AvatarDownloader) File(java.io.File) ImageLoaderConfiguration(com.nostra13.universalimageloader.core.ImageLoaderConfiguration) DisplayImageOptions(com.nostra13.universalimageloader.core.DisplayImageOptions)

Aggregations

UnlimitedDiskCache (com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache)1 DisplayImageOptions (com.nostra13.universalimageloader.core.DisplayImageOptions)1 ImageLoaderConfiguration (com.nostra13.universalimageloader.core.ImageLoaderConfiguration)1 File (java.io.File)1 AvatarDownloader (me.sheimi.android.avatar.AvatarDownloader)1