Search in sources :

Example 11 with ImageScaleType

use of com.nostra13.universalimageloader.core.assist.ImageScaleType in project StickerCamera by Skykai521.

the class App method initImageLoader.

private void initImageLoader() {
    DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder().cacheInMemory(false).imageScaleType(ImageScaleType.EXACTLY).cacheOnDisk(true).build();
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).threadPriority(Thread.NORM_PRIORITY - 2).defaultDisplayImageOptions(defaultOptions).denyCacheImageMultipleSizesInMemory().diskCacheFileNameGenerator(new Md5FileNameGenerator()).diskCache(new UnlimitedDiskCache(StorageUtils.getOwnCacheDirectory(this, AppConstants.APP_IMAGE))).diskCacheSize(100 * 1024 * 1024).tasksProcessingOrder(QueueProcessingType.LIFO).memoryCache(new LruMemoryCache(2 * 1024 * 1024)).memoryCacheSize(2 * 1024 * 1024).threadPoolSize(3).build();
    ImageLoader.getInstance().init(config);
}
Also used : UnlimitedDiskCache(com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache) Md5FileNameGenerator(com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator) LruMemoryCache(com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache) ImageLoaderConfiguration(com.nostra13.universalimageloader.core.ImageLoaderConfiguration) DisplayImageOptions(com.nostra13.universalimageloader.core.DisplayImageOptions)

Aggregations

DisplayImageOptions (com.nostra13.universalimageloader.core.DisplayImageOptions)7 FadeInBitmapDisplayer (com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer)6 BitmapFactory (android.graphics.BitmapFactory)4 File (java.io.File)4 UnlimitedDiskCache (com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache)3 LruMemoryCache (com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache)3 ImageLoaderConfiguration (com.nostra13.universalimageloader.core.ImageLoaderConfiguration)3 ImageSize (com.nostra13.universalimageloader.core.assist.ImageSize)3 ActionBar (android.app.ActionBar)2 Tab (android.app.ActionBar.Tab)2 Bitmap (android.graphics.Bitmap)2 SpannableString (android.text.SpannableString)2 TypedValue (android.util.TypedValue)2 View (android.view.View)2 HashCodeFileNameGenerator (com.nostra13.universalimageloader.cache.disc.naming.HashCodeFileNameGenerator)2 ImageScaleType (com.nostra13.universalimageloader.core.assist.ImageScaleType)2 BaseImageDecoder (com.nostra13.universalimageloader.core.decode.BaseImageDecoder)2 BaseImageDownloader (com.nostra13.universalimageloader.core.download.BaseImageDownloader)2 Options (android.graphics.BitmapFactory.Options)1 Matrix (android.graphics.Matrix)1