app/src/main/java/com/yahala/ImageLoader/ImageManager.java
/**
     * Loads an image into the cache, it does not bind the image to any view.
     * This method can be used for pre-fetching images.
     * If the image is already cached, the image is not fetched from the net.
     * <p/>
     * This method runs in the same thread as the caller method.
     * Hence, make sure that this method is not called from the main thread.
     * <p/>
     * If the image could be retrieved and decoded the resulting bitmap is cached.
     *
     * @param url Url of image to be pre-fetched
     * @width size of the cached image
     * @height size of the cached image
     */
Loads an image into the cache, it does not bind the image to any view.
This method can be used for pre-fetching images.
If the image is already cached, the image is not fetched from the net.

This method runs in the same thread as the caller method.
Hence, make sure that this method is not called from the main thread.

If the image could be retrieved and decoded the resulting bitmap is cached.

@param url Url of image to be pre-fetched
@width size of the cached image
@height size of the cached image
Loads an image into the cache it does not bind the image to any view . This method can be used for pre - fetching images . If the image is already cached the image is not fetched from the net . This method runs in the same thread as the caller method . Hence make sure that this method is not called from the main thread . If the image could be retrieved and decoded the resulting bitmap is cached . @param url Url of image to be pre - fetched @width size of the cached image @height size of the cached image
public void cacheImage(String url, int width, int height) {
        Bitmap bm = loaderSettings.getCacheManager().get(url, width, height);
        if (bm == null) {
            try {
                File imageFile = loaderSettings.getFileManager().getFile(url, width, height);
                if (!imageFile.exists()) {
                    loaderSettings.getNetworkManager().retrieveImage(url, imageFile);
                }
                Bitmap b;
                if (loaderSettings.isAlwaysUseOriginalSize()) {
                    b = loaderSettings.getBitmapUtil().decodeFile(imageFile, width, height);
                } else {
                    b = loaderSettings.getBitmapUtil().decodeFileAndScale(imageFile, width, height, loaderSettings.isAllowUpsampling());
                }
                if (b != null) {
                    loaderSettings.getCacheManager().put(url, b);
                }
            } catch (ImageNotFoundException inf) {
                inf.printStackTrace();
            }
        }
    }
public void cacheImage ( String url , int width , int height ) { Bitmap bm = loaderSettings . getCacheManager ( ) . get ( url , width , height ) ; if ( bm == null ) { try { File imageFile = loaderSettings . getFileManager ( ) . getFile ( url , width , height ) ; if ( ! imageFile . exists ( ) ) { loaderSettings . getNetworkManager ( ) . retrieveImage ( url , imageFile ) ; } Bitmap b ; if ( loaderSettings . isAlwaysUseOriginalSize ( ) ) { b = loaderSettings . getBitmapUtil ( ) . decodeFile ( imageFile , width , height ) ; } else { b = loaderSettings . getBitmapUtil ( ) . decodeFileAndScale ( imageFile , width , height , loaderSettings . isAllowUpsampling ( ) ) ; } if ( b != null ) { loaderSettings . getCacheManager ( ) . put ( url , b ) ; } } catch ( ImageNotFoundException inf ) { inf . printStackTrace ( ) ; } } }
Loads an image into the cache, it does not bind the image to any view.
Loads an image into the cache it does not bind the image to any view .
// no-op