Code example for ThreadPoolExecutor

Methods: execute

0
 
        if (imageCache.containsKeyInMemory(imageUrl)) {
            // do not go through message passing, handle directly instead 
            handler.handleImageLoaded(imageCache.getBitmap(imageUrl), null);
        } else { 
            executor.execute(new ImageLoader(imageUrl, handler));
        } 
    } 
 
    /** 
     * Clears the 1st-level cache (in-memory cache). A good candidate for calling in 
     * {@link android.app.Application#onLowMemory()}. 
     */ 
    public static void clearCache() { 
        imageCache.clear();
    } 
 
    /** 
     * Returns the image cache backing this image loader. 
     *  
     * @return the {@link ImageCache}