ImageLoader的用法
来源:互联网 发布:服务器raid数据恢复 编辑:程序博客网 时间:2024/06/12 01:14
package com.bwie.test.application;
import com.bwie.test.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import android.app.Application;
import android.graphics.Bitmap;
public class MyApplication extends Application {
public static DisplayImageOptions options;
@Overridepublic void onCreate() { // TODO Auto-generated method stub super.onCreate(); ImageLoaderConfiguration configuration = new ImageLoaderConfiguration .Builder(getApplicationContext()) .memoryCacheSize(2 * 1024 * 1024)//设置他的缓存大小 .threadPoolSize(3)//设置开启的线程 .build(); ImageLoader.getInstance().init(configuration); options = new DisplayImageOptions.Builder() .cacheInMemory(true) .cacheOnDisk(true) .showImageForEmptyUri(R.drawable.ic_launcher) .showImageOnLoading(R.drawable.ic_launcher) .bitmapConfig(Bitmap.Config.RGB_565) .build();}
}
加载图片
ImageLoader.getInstance().displayImage(img, myimg, MyApplication.options);
0 0
- ImageLoader的用法
- ImageLoader的用法
- ImageLoader的用法
- ImageLoader的用法
- Volley的ImageLoader用法
- ImageLoader的简单用法
- Android中ImageLoader的用法
- imageloader用法
- ImageLoader用法
- Android-Universal-ImageLoader的用法和案例
- Universal-ImageLoader的优点,以及用法
- Android ImageLoader用法总结
- ImageLoader用法 图片加载
- ImageLoader用法详解
- ImageLoader用法总结
- 浅析Android 开源框架ImageLoader的用法
- Volley之ImageLoader用法解析
- Imageloader<5>-ImageLoader的变量初始化
- GitHub超详细推荐
- 2208988800一个奇怪的数字
- 飞机的动画加载
- 易經大意原稿 凸001-100
- STM32开发C语言---switch
- ImageLoader的用法
- 278. First Bad Version
- HTTPS加密传输数据,加强P2P平台网络安全和信任
- Android程序的目录结构
- Dubbo Zookeeper与Spring或者struts2整合和使用
- 6月30日笔记
- 两种方法实现在HTML页面加载完毕后运行
- 高并发系统设计
- radioGroup动态加载radiobutton且radiobutton没有button圆圈按钮