Skip to content

Commit

Permalink
Add CacheManager Usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinea committed Apr 26, 2014
1 parent be23310 commit 53c441a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cn/trinea/android/demo/ImageCacheDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ protected void onDestroy() {
super.onDestroy();
}

/**
* if you just want load image for ImageView, just like this, no need to setOnImageCallbackListener and so on like
* <code>static</code> below
*/
// public static final ImageCache IMAGE_CACHE = CacheManager.getImageCache();

/** icon cache **/
public static final ImageCache IMAGE_CACHE = new ImageCache(128, 512);

Expand Down
6 changes: 6 additions & 0 deletions src/cn/trinea/android/demo/ImageSDCardCacheDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ protected void onDestroy() {
super.onDestroy();
}

/**
* if you just want load image for ImageView, just like this, no need to setOnImageSDCallbackListener and so on like
* <code>static</code> below
*/
// public static final ImageSDCardCache IMAGE_SD_CACHE = CacheManager.getImageSDCardCache();

/** image cache **/
public static final ImageSDCardCache IMAGE_SD_CACHE = new ImageSDCardCache();

Expand Down

0 comments on commit 53c441a

Please sign in to comment.