Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 51 lines (31 sloc) 1.511 kb
2d95e5f @luigi-agosti some javadoc, clean up of the demo app
luigi-agosti authored
1 h1. ImageLoader demo
2
3 ImageLoader provides a demo application so that you can quickly see potential use cases for the imageLoader library
4
5 "Install the ImageLoader application":https://play.google.com/store/apps/details?id=com.novoda.imageloader.demo
6
7 h2. Examples
8
9 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.
10
11 <pre><code>
12 private static ImageManager imageManager;
13
14 @Override
15 public void onCreate() {
16 super.onCreate();
17 normalImageManagerSettings();
18 }
19
20 private void normalImageManagerSettings() {
21 imageManager = new ImageManager(this, new SettingsBuilder()
22 .withCacheManager(new LruBitmapCache(this)).build(this));
23 }
24 </code></pre>
25
26 h3. Long list of images
27
28
29 h3. Long list of small images
30
31
32 h3. Big images
33
34 This activity is to demo the stability with very big images.
35
36 h3. Direct Loading
37
38 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.
39
40 <pre><code>
41 import com.novoda.imageloader.core.util.DirectLoader;
42
43 DirectLoader dl = new DirectLoader();
44 Bitmap b = dl.download("http://www.asianweek.com/wp-content/uploads/2012/03/microsoft_logo11.jpg");
45 </code></pre>
46
47 This functionality should be used carefully as interface may change in the next few releases and outside of the main thread.
48
49 h3. Gallery Demo
50
51 Work in progress...
Something went wrong with that request. Please try again.