# ![Logo](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/sample/res/drawable-mdpi/ic_launcher.png) Universal Image Loader [![Build Status](https://travis-ci.org/nostra13/Android-Universal-Image-Loader.svg?branch=master)](https://travis-ci.org/nostra13/Android-Universal-Image-Loader) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.nostra13.universalimageloader/parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.nostra13.universalimageloader/parent)
Android library **[#1](https://www.gitrep.com/search?utf8=✓&omni_search=&public_tags%5B%5D=android&description=&search=true&sort=star_count&commit=Search)** on GitHub.
UIL aims to provide a powerful, flexible and highly customizable instrument for image loading, caching and displaying. It provides a lot of configuration options and good control over the image loading and caching process.
![Screenshot](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/UniversalImageLoader.png)
## Project News
* Really have no time for development but anyway UIL is still alive :)
**Upcoming changes in new UIL version (1.9.4+)**
* Memory Cache redesign
* Video file thumbnail support via `file:///sdcard/video.mp4`
* **New API:** `DisplayImageOptions.targetSize(ImageSize)`
* HTTP cache support
* Consider `BitmapFactory.Options.inBitmap`
* Time-to-live option for files in LruDiskCache
## Features
* Multithread image loading (async or sync)
* Wide customization of ImageLoader's configuration (thread executors, downloader, decoder, memory and disk cache, display image options, etc.)
* Many customization options for every display image call (stub images, caching switch, decoding options, Bitmap processing and displaying, etc.)
* Image caching in memory and/or on disk (device's file system or SD card)
* Listening loading process (including downloading progress)
Android 2.0+ support
## Downloads
* **[universal-image-loader-1.9.3.jar](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/downloads/universal-image-loader-1.9.3.jar)**
* **[universal-image-loader-1.9.3-with-sources.jar](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/downloads/universal-image-loader-1.9.3-with-sources.jar)** (for Eclipse)
* [![Demo app](https://camo.githubusercontent.com/dc1ffe0e4d25c2c28a69423c3c78000ef7ee96bf/68747470733a2f2f646576656c6f7065722e616e64726f69642e636f6d2f696d616765732f6272616e642f656e5f6170705f7267625f776f5f34352e706e67)](https://play.google.com/store/apps/details?id=com.nostra13.universalimageloader.sample) [![QR Code](https://lh3.ggpht.com/csXEddxiLgQ6FxckefjQnP1PVugbaAYOdcuTa3vVtGV1PlWbFu2dYggoH8rI1w2RdEz1=w50)](http://chart.apis.google.com/chart?chs=300x300&cht=qr&chld=|1&chl=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.nostra13.universalimageloader.sample) [<img src="http://mobway.in/image/apk.png" height="45px" />](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/downloads/universal-image-loader-sample-1.9.3.apk)
## [Documentation](https://github.com/nostra13/Android-Universal-Image-Loader/wiki)
* **[Quick Setup](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Quick-Setup)**
* **[Configuration](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Configuration)**
* **[Display Options](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Display-Options)**
* [Useful Info](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/Useful-Info) - Read it before asking a question
* [User Support](https://github.com/nostra13/Android-Universal-Image-Loader/wiki/User-Support) - Read it before creating new issue
* [Sample project](https://github.com/nostra13/Android-Universal-Image-Loader/tree/master/sample) - Learn it to understand the right way of library usage
* [ChangeLog](https://github.com/nostra13/Android-Universal-Image-Loader/blob/master/CHANGELOG.md) - Info about API changes is here
## Usage
### Acceptable URIs examples
``` java
"http://site.com/image.png" // from Web
"file:///mnt/sdcard/image.png" // from SD card
"file:///mnt/sdcard/video.mp4" // from SD card (video thumbnail)
"content://media/external/images/media/13" // from content provider
"content://media/external/video/media/13" // from content provider (video thumbnail)
"assets://image.png" // from assets
"drawable://" + R.drawable.img // from drawables (non-9patch images)
```
**NOTE:** Use `drawable://` only if you really need it! Always **consider the native way** to load drawables - `ImageView.setImageResource(...)` instead of using of `ImageLoader`.
### Simple
``` java
// Load image, decode it to Bitmap and display Bitmap in ImageView (or any other view
// which implements ImageAware interface)
imageLoader.displayImage(imageUri, imageView);
```
``` java
// Load image, decode it to Bitmap and return Bitmap to callback
imageLoader.loadImage(imageUri, new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
// Do whatever you want with Bitmap
}
});
```
``` java
// Load image, decode it to Bitmap and return Bitmap synchronously
Bitmap bmp = imageLoader.loadImageSync(imageUri);
```
### Complete
``` java
// Load image, decode it to Bitmap and display Bitmap in ImageView (or any other view
// which implements ImageAware interface)
imageLoader.displayImage(imageUri, imageView, options, new ImageLoadingListener() {
@Override
public void onLoadingStarted(String imageUri, View view) {
...
}
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
...
}
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
...
}
@Override
public void onLoadingCancelled(String imageUri, View view) {
...
}
}, new ImageLoadingProgressListener() {
@Override
public void onProgressUpdate(String imageUri, View view, int current, int total) {
...
}
});
```
``` java
// Load image, decode it to Bitmap and return Bitmap to callback
ImageSize targetSize = new ImageSize(80, 50); // result Bitmap will be fit to this size
imageLoader.loadImage(imageUri, targetSize, options, new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
// Do whatever you want with Bitmap
}
});
```
``` java
// Load image, decode it to Bitmap and return Bitmap synchronously
ImageSize targetSize = new ImageSize(80, 50); // result Bitmap will be fit to this size
Bitmap bmp = imageLoader.loadImageSync(imageUri, targetSize, options);
```
## Load & Display Task Flow
![Task Flow](https://github.com/nostra13/Android-Universal-Image-Loader/raw/master/wiki/UIL_Flow.png)
## Applications using Universal Image Loader
**[MediaHouse, UPnP/DLNA Browser](https://play.google.com/store/apps/details?id=com.dbapp.android.mediahouse)** | **[Prezzi Benzina (AndroidFuel)](https://play.google.com/store/apps/details?id=org.vernazza.androidfuel)** | **[ROM Toolbox Lite](https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolbox)**, [Pro](https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro) | [Stadium Astro](https://play.google.com/store/apps/details?id=com.astro.stadium.activities) | [Chef Astro](https://play.google.com/store/apps/details?id=com.sencha.test) | [Sporee - Live Soccer Scores](https://play.google.com/store/apps/details?id=com.sporee.android) | **[EyeEm - Photo Filter Camera](https://play.google.com/store/apps/details?id=com.baseapp.eyeem)** | **[Topface - meeting is easy](https://play.google.com/store/apps/details?id=com.topface.topface)** | **[reddit is fun](https://play.google.com/store/apps/details?id=com.andrewshu.android.reddit)** | **[Diaro - personal diary](https://play.google.com/store/apps/details?id=com.pixelcrater.Diaro)** | **[Meetup](https://play.google.com/store/apps/details?id=com.meetup)** | [Vingle - Magazines by
没有合适的资源?快使用搜索试试~ 我知道了~
Android加载网络图片与本地图片解决OOM问题
共484个文件
html:217个
java:87个
xml:21个
4星 · 超过85%的资源 需积分: 25 65 下载量 79 浏览量
2015-06-10
11:38:53
上传
评论
收藏 28.57MB ZIP 举报
温馨提示
Android解决图片加载OOM与listview图片错位乱跳问题解决,开源的代码,里面有示例demo
资源推荐
资源详情
资源评论
收起资源包目录
Android加载网络图片与本地图片解决OOM问题 (484个子文件)
0034d1261201b0b5f628e796b89e7e38d9aa38 479B
0316511a9639b527a54ee46daa707191691b4a 157B
08fed9662946d3934624a37e8cdedf6daca76f 282B
0e4180d080dbca5f45ac54cdaef101d314bcf0 156B
131c803c737e2fe69530691e6f3dfc12b27cc0 50B
14d982a5b75b74593fd9a9b56e41af7c019324 892KB
15b4ca4db4450d9ab39952075a3456bcf34b35 149B
167bef049f137b5b5ef4809c6919a7377256df 63B
17b929116d1f00f2a3ff15d7b61a2b859eae46 504KB
185a565d06749cc6d0ee315a6b6b60105dee4a 583B
19fe9247741a423199651e1c3aeffd184946ac 62B
1ca32e78ab4649c9edf844074feabc496b4e4e 1KB
1d0e8f9ca271cfc8ed83752c519bdd8ef5b687 137KB
2853b0e0738f19a1d010fefb76b96a1e0485c2 254KB
3c1fbf1b3b71ef3ec7ec9abbd7d1f12c48bc84 2KB
3c51204325fbb1a5c91ed191f4d60f54e5264d 174B
v1.9.4 41B
403ae62b029010178dd162587b2f49d1488679 282B
412eb4af7a5e1e6280ed03745458ce4fdfd3d5 583B
424d96098306a10d655c5c07d7d77dac9af4ab 283B
44c03fcf30c5cbb42fdb5956a3f572a2d2a8f7 5KB
4b471fce25cef97e92df9e4d7ddf8faf525ee8 760B
4d961f27fad951355547665a6294c4d4994779 583B
4e7fc61f618898640eccacb846673921fc69bf 282B
529b27ac0f95b91b7fbca06bf6c218db122fb3 73B
54460c6582ad879c2e97c6b4f55c926f6cb6fb 247B
55876c3ec693b7017d4875ac37f49f40aaef0b 682B
59fa9afab5761cfc933a04e3290374406844e8 583B
5d93aa26c320d9a4488e98add12a50429f8408 582B
687ed5f0ac2be84414abd7799d8a4696ab640e 80B
6dd8525634f4900fdebecc46ef814790d2da0f 5KB
72f5a4eefdcc6ab00d7f8a9faa746dc9fc0e03 119KB
78836980e47d9813165051b4b8527fff8e1b58 178B
795ac2b7616491d20124cd148061094c13a040 856B
7bdf7f54612f163b9c7af44d4d1ddc79489e16 867B
7e1dfaeab778e431a8190ce52fcfee1c73a5b8 45B
8681f480cef4a8aeb828c64bac524da91ccd0e 191B
8fbfa0e13309aa55215757caf63c1b7a6c299e 810B
90c1635f385bbda8702ebd82fefc725f47daa8 282B
98bbfe9b8af8928203d2a45ac563b9f8ae23b9 45B
a031d447b9d47d1a638b44735e4e8911e0717b 50B
a304c00c4b236c3280ef1e5b569e8dd5b1847f 63B
a6df1b61b3432eed1190cf02d8ac3d9e732de9 212B
a741439efc13f1aa84036a8b73b8b1b1d4234b 2KB
a9f1529028710e563571a032b95eb52472776c 5KB
aa6e87a1c32d764f146bf1673f2d895e35dbb1 76B
aad959e1d32603902c4a5bd43b5893b500fb34 2KB
abb753232aaea1d9ae43154c868a2af38d68d3 584B
ac7342c47bfa522f51fab85b6815e3de4b5e84 169B
ae36eece8382f36b92308f2a74ddc1d874ec12 668B
af069562a0b8da54d8c562785ca499e5e74cc6 282B
universal-image-loader-sample-1.9.3.apk 832KB
b1e45d68388a436aac9c64fc5a1e613b1aca7f 119B
b2bae46f2c2cca8d0a4e5bead722db0d7ecfbe 46B
b67498281ee64257b1f9e55e88505d86503c8b 640B
gradlew.bat 2KB
bbda9964957e8bbbf664ef721c2be9ef1c8744 284B
c0c3349d66926dc39d9c9fcc3263c212b14a6f 181B
c6f1b5b5f801a627751a9671c8ed4f6be35cb9 491B
c713d8360d7d2e7405178c0d4b1c5912e0ab1f 284B
cdaa2c901950b44fe957deeccb9388174275e7 1KB
config 529B
stylesheet.css 1KB
d055fde6e70f297b90524eb37e5ccda5b75dd2 182B
d19d75e75b2fcd309199f25b0658a460aee981 149B
db8e2f9be2d9ac72e06d494bf88622fa345348 284B
dd24ff812a4014e4e7cd12b871a1a7e568efa3 871B
ddf376524429b48f5edd9d1a3b0038d08965d8 282B
description 73B
.DS_Store 6KB
e4bca462d5a896bfdc2b3873f17734cfbab58a 103B
e8554c1ae2bf23784d1de55a11429aaae964ba 282B
e8e17b2203adba07483d19fce259d48b132ae0 583B
exclude 250B
f0c18213dd2926825611bca4e60688aa83f1ad 583B
f571596f570751db231ce6fefd32a7910aef1d 583B
f9b38d6bcfcde630f4eebb0e7e4fc95ae00318 157B
FETCH_HEAD 425B
ff7c3044699b7af65903575cd56c6a6fb1955d 215B
inherit.gif 57B
.gitignore 263B
maven_push.gradle 4KB
build.gradle 2KB
build.gradle 469B
build.gradle 376B
settings.gradle 30B
gradlew 5KB
HEAD 406B
HEAD 209B
HEAD 32B
HEAD 23B
index-all.html 306KB
LinkedBlockingDeque.html 159KB
ImageLoader.html 111KB
BlockingDeque.html 107KB
Deque.html 74KB
ImageLoaderConfiguration.Builder.html 65KB
DisplayImageOptions.Builder.html 53KB
BaseImageDownloader.html 45KB
BaseDiscCache.html 40KB
共 484 条
- 1
- 2
- 3
- 4
- 5
资源评论
- qq_267836472017-01-06怎么用啊。运行不起来啊
Jasonez
- 粉丝: 3
- 资源: 57
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功