I don't want to download images if they are already cached. I am using ImageLoader library by NOSTRA. Please tell me if there is any way to do that. Following is the code:-
DisplayImageOptions options = new DisplayImageOptions.Builder()
.showStubImage(R.drawable.ic_stub)
.showImageForEmptyUri(R.drawable.ic_sample)
.resetViewBeforeLoading()
.cacheInMemory()
.cacheOnDisc()
.imageScaleType(ImageScaleType.EXACTLY_STRETCHED)
.bitmapConfig(Bitmap.Config.ARGB_8888)
.build();
imageLoader.displayImage(url2.toString()
,thumbnail,options, new
ImageLoadingListener() {
@Override
public void onLoadingStarted() {
// progressBar.setVisibility(grid.VISIBLE);
// grid.notify();
}
@Override
public void onLoadingFailed(FailReason failReason) {
//progressBar.setVisibility(grid.GONE);
// grid.notify();
}
@Override
public void onLoadingComplete(Bitmap bitmap) {
// progressBar.setVisibility(grid.GONE);
// grid.notify();
}
@Override
public void onLoadingCancelled() {
// progressBar.setVisibility(grid.GONE);
//grid.notify();
}
});