Here you can find the source of addBitmapToMemoryCache(String key, Bitmap bitmap)
private static void addBitmapToMemoryCache(String key, Bitmap bitmap)
//package com.java2s; import android.graphics.Bitmap; import android.support.v4.util.LruCache; public class Main { private static LruCache<String, Bitmap> mMemoryCache; private static void addBitmapToMemoryCache(String key, Bitmap bitmap) { if (getBitmapFromMemCache(key) == null) { mMemoryCache.put(key, bitmap); }/*from ww w.j a v a 2 s . com*/ } private static Bitmap getBitmapFromMemCache(String key) { return mMemoryCache.get(key); } }