Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 51 lines (31 sloc) 1.511 kb

ImageLoader demo

ImageLoader provides a demo application so that you can quickly see potential use cases for the imageLoader library

Install the ImageLoader application

Examples

Generally a good way to use the imageLoader is to initialize an instance in the Application class and keep a static reference that can be accessed from every part of the app.


private static ImageManager imageManager;

@Override
public void onCreate() {
    super.onCreate();
	normalImageManagerSettings();
}

private void normalImageManagerSettings() {
    imageManager = new ImageManager(this, new SettingsBuilder()
        .withCacheManager(new LruBitmapCache(this)).build(this));
}

Long list of images

Long list of small images

Big images

This activity is to demo the stability with very big images.

Direct Loading

If you don’t want to use the async feature of the image loader, but you don’t want to set up a HttpClient or a UrlConnection to get the image, you can use the ImageLoader library to do it.


import com.novoda.imageloader.core.util.DirectLoader;

DirectLoader dl = new DirectLoader();
Bitmap b = dl.download("http://www.asianweek.com/wp-content/uploads/2012/03/microsoft_logo11.jpg");

This functionality should be used carefully as interface may change in the next few releases and outside of the main thread.

Gallery Demo

Work in progress…

Something went wrong with that request. Please try again.