use of com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator in project SeaStar by 13120241790.
the class App method onCreate.
@Override
public void onCreate() {
super.onCreate();
// rongcloud 初始化
RongIM.init(this);
if (getApplicationInfo().packageName.equals(getCurProcessName(getApplicationContext()))) {
RongCloudEvent.init(this);
RongIM.registerMessageType(AgreedFriendRequestMessage.class);
RongIM.registerMessageTemplate(new ContactNotificationMessageProvider());
}
// BugTags 初始化
Bugtags.start(BUGTAGS_APPKEY, this, Bugtags.BTGInvocationEventBubble);
//友盟session时间间隔
MobclickAgent.setSessionContinueMillis(30 * 60 * 1000);
//oneCore 打印参数
NLog.setDebug(true);
options = new DisplayImageOptions.Builder().showImageForEmptyUri(R.drawable.rp_default_head).showImageOnFail(R.drawable.rp_default_head).showImageOnLoading(R.drawable.rp_default_head).displayer(new FadeInBitmapDisplayer(300)).cacheInMemory(true).cacheOnDisk(true).build();
//初始化图片下载组件
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext()).threadPriority(Thread.NORM_PRIORITY - 2).denyCacheImageMultipleSizesInMemory().diskCacheSize(50 * 1024 * 1024).diskCacheFileCount(200).diskCacheFileNameGenerator(new Md5FileNameGenerator()).defaultDisplayImageOptions(options).build();
//Initialize ImageLoader with configuration.
ImageLoader.getInstance().init(config);
}
use of com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator in project PhotoNoter by yydcdut.
the class GalleryApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.LOG_DEBUG) {
LeakCanary.install(this);
}
YLog.setDEBUG(BuildConfig.LOG_DEBUG);
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this).threadPriority(Thread.NORM_PRIORITY - 2).denyCacheImageMultipleSizesInMemory().discCacheFileNameGenerator(new Md5FileNameGenerator()).tasksProcessingOrder(QueueProcessingType.LIFO).build();
ImageLoader.getInstance().init(config);
DisplayImageOptions sOptions = new DisplayImageOptions.Builder().cacheInMemory(//设置下载的图片是否缓存在内存中
true).considerExifParams(//是否考虑JPEG图像EXIF参数(旋转,翻转)
true).bitmapConfig(//设置图片的解码类型//
Bitmap.Config.RGB_565).build();
//构建完成
PGEditImageLoader.initImageLoader(this);
PGEditSDK.instance().initSDK(this);
}
Aggregations