From 1c735009345e77e2dd29c96ce04c23841b28019a Mon Sep 17 00:00:00 2001 From: Trinea Date: Sat, 4 Jan 2014 12:46:47 +0800 Subject: [PATCH] add onGetNotInCache --- src/cn/trinea/android/demo/ImageCacheDemo.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cn/trinea/android/demo/ImageCacheDemo.java b/src/cn/trinea/android/demo/ImageCacheDemo.java index 672a0ee..4d90006 100644 --- a/src/cn/trinea/android/demo/ImageCacheDemo.java +++ b/src/cn/trinea/android/demo/ImageCacheDemo.java @@ -163,6 +163,11 @@ public void onGetFailed(String imageUrl, Drawable imageDrawable, View view, Fail .append(failedReason.getFailedType()).append(", failed reason is: ") .append(failedReason.getCause().getMessage()).toString()); } + + @Override + public void onGetNotInCache(String imageUrl, View view) { + // you can do something when image not in cache, for example set default image + } }; IMAGE_CACHE.setOnImageCallbackListener(imageCallBack); IMAGE_CACHE.setCacheFullRemoveType(new RemoveTypeLastUsedTimeFirst());