Code example for SoftReference

Methods: get

0
		} 
    } 
     
    public Drawable getImageFromCache(String url) {
    	if (imageCache.containsKey(url)) {
    		return imageCache.get(url).get();
    	} else { 
    		return null; 
    	} 
    } 
	 
    public synchronized void loadDrawable(final String imageUrl, final ImageCallback imageCallback) {
    	 
    	final Handler handler = new Handler() {
    		@Override 
    		public void handleMessage(Message message) {
                imageCallback.imageLoaded((Drawable) message.obj, imageUrl);
    		} 
    	}; 
    	 
    	final Runnable task = new Runnable() {