protected ImageLoader.Builder getBuilder() {
        // Get memory class of this device, exceeding this amount will throw an
        // OutOfMemory exception.
        ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
        int memClass = am.getMemoryClass();

        // Use part of the available memory for memory cache.
        final int memoryCacheSize = 1024 * 1024 * memClass / getMemoryDivider();

        int diskCache = getDiskCacheSize();
        if (Logger.DEBUG) Log.d(TAG, "Using memory cache of size: " + humanReadableByteCount(memoryCacheSize, false));
        if (Logger.DEBUG) Log.d(TAG, "Using disk cache of size: " + humanReadableByteCount(diskCache, false));

        File cacheDir = IOUtil.getDiskCacheDir(this, getCacheFolderName());
        return new ImageLoader.Builder(this)
                .enableDiskCache(cacheDir, diskCache)
                .enableMemoryCache(memoryCacheSize);
    }
protected ImageLoader . Builder getBuilder ( ) { ActivityManager am = ( ActivityManager ) getSystemService ( Context . ACTIVITY_SERVICE ) ; int memClass = am . getMemoryClass ( ) ; final int memoryCacheSize = 1024 * 1024 * memClass / getMemoryDivider ( ) ; int diskCache = getDiskCacheSize ( ) ; if ( Logger . DEBUG ) Log . d ( TAG , "Using memory cache of size: " + humanReadableByteCount ( memoryCacheSize , false ) ) ; if ( Logger . DEBUG ) Log . d ( TAG , "Using disk cache of size: " + humanReadableByteCount ( diskCache , false ) ) ; File cacheDir = IOUtil . getDiskCacheDir ( this , getCacheFolderName ( ) ) ; return new ImageLoader . Builder ( this ) . enableDiskCache ( cacheDir , diskCache ) . enableMemoryCache ( memoryCacheSize ) ; }
The builder used to construct the {@link ImageLoader} used by this {@link Application}.

@return the builder