ImageLoader的简易配置
来源:互联网 发布:win10 禁用windows 键 编辑:程序博客网 时间:2024/04/30 10:21
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
File cacheDir = StorageUtils.getCacheDirectory(this);
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(
this)
.memoryCacheExtraOptions(480, 800)
.memoryCacheSize(2 * 1024 * 1024)//内存缓存 2M
.diskCacheExtraOptions(480, 800, null)
.diskCache(new UnlimitedDiskCache(cacheDir))
.diskCacheFileNameGenerator(new HashCodeFileNameGenerator())//为了避免重复
.diskCacheSize(50 * 1024 * 1024)//缓存图片50M到sdcard
.imageDownloader(new BaseImageDownloader(this))
.build();
//初始化imageloader
ImageLoader.getInstance().init(configuration);
}
}
@Override
public void onCreate() {
super.onCreate();
File cacheDir = StorageUtils.getCacheDirectory(this);
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(
this)
.memoryCacheExtraOptions(480, 800)
.memoryCacheSize(2 * 1024 * 1024)//内存缓存 2M
.diskCacheExtraOptions(480, 800, null)
.diskCache(new UnlimitedDiskCache(cacheDir))
.diskCacheFileNameGenerator(new HashCodeFileNameGenerator())//为了避免重复
.diskCacheSize(50 * 1024 * 1024)//缓存图片50M到sdcard
.imageDownloader(new BaseImageDownloader(this))
.build();
//初始化imageloader
ImageLoader.getInstance().init(configuration);
}
}
0 0
- ImageLoader的简易配置
- ImageLoader的简易配置
- 简易版的Imageloader
- Imageloader的简单配置
- ImageLoader 的一些配置
- ImageLoader的配置使用
- Imageloader的配置
- 常用的ImageLoader配置
- ImageLoader的默认配置
- imageloader的配置
- imageloader的配置
- imageloader的配置
- imageloader的配置
- ImageLoader的配置
- imageloader的默认配置
- ImageLoader的配置
- 配置ImageLoader
- ImageLoader配置
- 测试使用word发布新浪博客
- 获得系统时间
- HDU 1559 二维树状数组
- Python __future__ 模块
- 最小二乘曲线拟合matlab实现
- ImageLoader的简易配置
- mt7620a上带机量的提高(三)
- strchr函数的用法
- 深入浅出JMS(二)--ActiveMQ简单介绍以及安装
- 09上机练习2
- 参照《第一行代码》开发CoolWeather (一)
- 计算机视觉(opencv和卷积)
- java中级面试题总结(1)
- API 25 (Android 7.1.1 API) view.SurfaceView