1--权限(联网,读写sd卡)
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
2--依赖 compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
3--重写MApp类extends Application, 切记要在清单文件调用 <application android:name=".Mapp"
*onCreate中
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this).build();
//获取ImageLoader的实例初始化配置参数;
ImageLoader.getInstance().init(configuration);
4 调用
//获取ImageLoader对象
参考资料
http://blog.csdn.net/vipzjyno1/article/details/23206387
http://blog.csdn.net/hudashi/article/details/52026798
https://github.com/nostra13/Android-Universal-Image-Loader
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
2--依赖 compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
3--重写MApp类extends Application, 切记要在清单文件调用 <application android:name=".Mapp"
*onCreate中
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this).build();
//获取ImageLoader的实例初始化配置参数;
ImageLoader.getInstance().init(configuration);
4 调用
//获取ImageLoader对象
instance = ImageLoader.getInstance();
//给图片赋值
参考资料
http://blog.csdn.net/vipzjyno1/article/details/23206387
http://blog.csdn.net/hudashi/article/details/52026798
https://github.com/nostra13/Android-Universal-Image-Loader