imageLoder的初始化配置
2016-04-09 11:17
393 查看
Quick Setup
Sergey Tarasevich edited this page on Nov 28, 2015 · 5 revisionsManual:
Download JAR
Put the JAR in the libs subfolder of your Android project
or
Maven dependency:
<dependency> <groupId>com.nostra13.universalimageloader</groupId> <artifactId>universal-image-loader</artifactId> <version>1.9.5</version> </dependency>
or
Gradle dependency:
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
2.
Android Manifest
<manifest> <!-- Include following permission if you load images from Internet --> <uses-permission android:name="android.permission.INTERNET" /> <!-- Include following permission if you want to cache images on SD card --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> ... </manifest>
3.
Application or Activity class (before the first usage of ImageLoader)
public class MyActivity extends Activity { @Override public void onCreate() { super.onCreate(); // Create global configuration and initialize ImageLoader with this config ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(this) ... .build(); ImageLoader.getInstance().init(config); ... } }
相关文章推荐
- 开闭原则(Open Close Principle)
- Universal-Image-Loader(android图片缓存)
- Centos服务器配置
- Drupal8系列(三):安装和初始化设置-Ubuntu 14.04 LTS 推荐
- ImageLoder
- imageloder2
- imageloder1
- IDEA初始化配置和打开多个项目!
- LruCache详解之 Android 内存优化
- ImageLoader的导包和第三方框架
- ImageLoader从本地获得图片
- ImagerLoder加载图片
- Listview+ImageLoder
- Android 开源框架Universal-Image-Loader的配置
- xlistview+imageloder+图片缓存到内存卡
- xlistview+imageloder+数据请求+下拉刷新
- 侧拉+xlistview+多条目展示+请求数据+tablayout+viewpager+Imageloder
- Win10和Ubuntu17.10双系统安装以及liunx系统初始配置
- Android开发中ImageLoder加载网络图片时将图片设置为ImageView背景的方法
- Android开发中ImageLoder进行图片加载和缓存