use of com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator in project Android-Universal-Image-Loader by nostra13.
the class UILApplication method initImageLoader.
public static void initImageLoader(Context context) {
// This configuration tuning is custom. You can tune every option, you may tune some of them,
// or you can create default configuration by
// ImageLoaderConfiguration.createDefault(this);
// method.
ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context);
config.threadPriority(Thread.NORM_PRIORITY - 2);
config.denyCacheImageMultipleSizesInMemory();
config.diskCacheFileNameGenerator(new Md5FileNameGenerator());
// 50 MiB
config.diskCacheSize(50 * 1024 * 1024);
config.tasksProcessingOrder(QueueProcessingType.LIFO);
// Remove for release app
config.writeDebugLogs();
// Initialize ImageLoader with configuration.
ImageLoader.getInstance().init(config.build());
}
use of com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator in project GalleryFinal by pengjianbo.
the class MainActivity method initImageLoader.
// @Override
// protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// super.onActivityResult(requestCode, resultCode, data);
// if (requestCode == GalleryFinal.GALLERY_REQUEST_CODE) {
// if (resultCode == GalleryFinal.GALLERY_RESULT_SUCCESS) {
// List<PhotoInfo> photoInfoList = (List<PhotoInfo>) data.getSerializableExtra(GalleryFinal.GALLERY_RESULT_LIST_DATA);
// if (photoInfoList != null) {
// mPhotoList.addAll(photoInfoList);
// mChoosePhotoListAdapter.notifyDataSetChanged();
// }
// }
// }
// }
private void initImageLoader(Context context) {
// This configuration tuning is custom. You can tune every option, you may tune some of them,
// or you can create default configuration by
// ImageLoaderConfiguration.createDefault(this);
// method.
ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context);
config.threadPriority(Thread.NORM_PRIORITY - 2);
config.denyCacheImageMultipleSizesInMemory();
config.diskCacheFileNameGenerator(new Md5FileNameGenerator());
// 50 MiB
config.diskCacheSize(50 * 1024 * 1024);
config.tasksProcessingOrder(QueueProcessingType.LIFO);
// Remove for release app
config.writeDebugLogs();
// Initialize ImageLoader with configuration.
ImageLoader.getInstance().init(config.build());
}
use of com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator in project 9GAG by stormzhang.
the class App method initImageLoader.
// 初始化ImageLoader
public static void initImageLoader(Context context) {
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context).threadPriority(Thread.NORM_PRIORITY - 2).denyCacheImageMultipleSizesInMemory().memoryCache(new LruMemoryCache(2 * 1024 * 1024)).discCacheSize(10 * 1024 * 1024).discCacheFileNameGenerator(new Md5FileNameGenerator()).tasksProcessingOrder(QueueProcessingType.LIFO).build();
ImageLoader.getInstance().init(config);
}
use of com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator in project PhotoNoter by yydcdut.
the class PGEditImageLoader method initImageLoader.
public static void initImageLoader(Application application) {
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(application).threadPriority(Thread.NORM_PRIORITY - 2).denyCacheImageMultipleSizesInMemory().discCacheFileNameGenerator(new Md5FileNameGenerator()).tasksProcessingOrder(QueueProcessingType.LIFO).writeDebugLogs().build();
ImageLoader.getInstance().init(config);
}
use of com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator in project PhotoNoter by yydcdut.
the class ImageLoaderManager method init.
public static void init(Context context) {
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context).threadPriority(Thread.NORM_PRIORITY - 2).denyCacheImageMultipleSizesInMemory().discCacheFileNameGenerator(new Md5FileNameGenerator()).tasksProcessingOrder(QueueProcessingType.LIFO).build();
ImageLoader.getInstance().init(config);
sOptions = new DisplayImageOptions.Builder().cacheInMemory(//设置下载的图片是否缓存在内存中
true).considerExifParams(//是否考虑JPEG图像EXIF参数(旋转,翻转)
true).bitmapConfig(//设置图片的解码类型//
Bitmap.Config.RGB_565).build();
//构建完成
}
Aggregations