caching images with LruCache
问题 I am trying to use LruCache in android to cache some images, but its not caching here is the code int cacheSize1 = 4 * 1024 * 1024; // 4MiB bitmapCache = new LruCache(cacheSize1) { protected int sizeOf(String key, Bitmap value) { return value.getRowBytes() * value.getHeight(); }}; here its other methods public void addBitmapToMemoryCache(String key, Bitmap bitmap) { if (getBitmapFromMemCache(key) == null) { bitmapCache.put(key, bitmap); } } public Bitmap getBitmapFromMemCache(String key) {