系统自带ImageLoader的简单使用

来源:互联网 发布:淘宝买了汽枪配件警察 编辑:程序博客网 时间:2024/06/04 19:36

1.创建一个类继承Application

ImageLoaderConfiguration aDefault = ImageLoaderConfiguration.createDefault(getApplicationContext());ImageLoader.getInstance().init(aDefault);

2.初始化然后展示

ImageLoader.getInstance().displayImage(newslist.get(position).getPicUrl(),holder.img);

3最后在清单文件配置创建的类

android:name=".app.MyApp"

原创粉丝点击