as far as I know, universal-image-loader provide 2 kinds of methods to display images. imageLoader.loadImage and imageLoader.displayImage. But those 2 methods must bind to UI element to display. Can I just download files for cache in a thread (for future display). I don't need to display those image right now.
You can still use UIL
. Based on the displayOptions
used below the images would be cached.
Refer here - https://github.com/nostra13/Android-Universal-Image-Loader
// Load image, decode it to Bitmap and return Bitmap to callback
imageLoader.loadImage(imageUri, displayOptions, new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
// Do whatever you want with Bitmap
}
});