[DEPRECATED] Use Picasso instead.
Android-ImageManager handles all the boilerplate code for simple downloading, caching and using images with Android. It downloads the images and caches them using an in-memory LRU and a second level Disk cache.
Usage:
Initialization
import com.felipecsl.android.imaging.*;
public class MainActivity extends Activity {
private ImageManager imageManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final MainActivity self = this;
if (!DiskLruImageCache.isInitialized()) {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
DiskLruImageCache.getInstance(self);
return null;
}
@Override
protected void onPostExecute(Void result) {
imageManager = new ImageManager(self);
}
}.execute();
}
}
Loading images
imageManager.loadImage("http://www.roflcat.com/images/cats/bike.jpg", imageView, new JobOptions());
- Seamless two-level caching (Memory and Disk, using DiskLruCache)
- Concurrent image downloads via android-async-http library
- Auto-rotation of JPEG images based on the EXIF information
- Ability to load local files (eg. from the device Gallery app using Uri)
Check the sample application for an example of usage
Try out the sample application on Google Play
This library was tested with Android API Level 8 and newer.
If your app uses this library, send a pull request with the update to this Readme file adding your app to the list!
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
- Fork the project
- Start a feature/bugfix branch
- Commit and push until you are happy with your contribution
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Felipe Lima (@felipecsl)
- Matias Pequeno (@matias-pequeno)
Copyright (c) 2012 Felipe Lima. See LICENSE.txt for further details.