Android-Universal-Image-Loader使用
来源:互联网 发布:俄罗斯现状 知乎 编辑:程序博客网 时间:2024/05/18 02:01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public
class
MyApplication
extends
Application{
@Override
public
void
onCreate() {
super
.onCreate();
initImageLoader(getApplicationContext());
}
/**初始化图片加载类配置信息**/
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 config =
new
ImageLoaderConfiguration.Builder(context)
.threadPriority(Thread.NORM_PRIORITY -
2
)
//加载图片的线程数
.denyCacheImageMultipleSizesInMemory()
//解码图像的大尺寸将在内存中缓存先前解码图像的小尺寸。
.discCacheFileNameGenerator(
new
Md5FileNameGenerator())
//设置磁盘缓存文件名称
.tasksProcessingOrder(QueueProcessingType.LIFO)
//设置加载显示图片队列进程
.writeDebugLogs()
// Remove for release app
.build();
// Initialize ImageLoader with configuration.
ImageLoader.getInstance().init(config);
}
}
1
android:name=
".MyApplication"
阅读全文
0 0
- Android Universal Image Loader 使用
- Android-Universal-Image-Loader 使用
- Android Universal-Image-Loader使用
- Android-Universal-Image-Loader使用
- android-universal-image-loader
- Android-Universal-Image-Loader
- Android-Universal-Image-Loader
- Android-Universal-Image-Loader
- Android-Universal-Image-Loader
- Android Universal Image Loader
- Android-Universal-Image-Loader
- Android-Universal-Image-Loader
- Android-Universal-Image-Loader
- Android Universal Image Loader
- Android Universal-Image-Loader
- Universal-Image-Loader 使用
- android-universal-image-loader的使用
- Universal Image Loader for Android 使用实例
- PAT乙级 1028. 人口普查(20)--字符串的妙用,两种方法解答
- 20170726 jQuery操作表格(table)的常用方法、技巧汇总
- HDU1197 Specialized Four-Digit Numbers
- apache+nginx基本配置
- PAT乙级 1029. 旧键盘(20)
- Android-Universal-Image-Loader使用
- 20170726 jQuery练习题 点击按钮更换图片
- glActiveTexture glBindTexture glUniform1i关系图
- UVA1606AmphiphilicCarbonMolecules
- 神器Nessus配置
- SQL函数小记
- PAT乙级 1030. 完美数列(25)--数学问题,算法超时优化
- 求差集:已知集合A和B的元素分别用不含头结点的单链表存储,函数difference()用于求解集合A与B的差集,并将结果保存在集合A的单链表中。例如,若集合A={5,10,20,15,25,30},集
- PAT乙级 1031. 查验身份证(15)