Back to project page photo-share-android.
The source code is released under:
Apache License
If you think the Android project photo-share-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.project.photoshare.utils.volley; // w ww . j av a2s . c o m import android.graphics.Bitmap; import android.support.v4.util.LruCache; import com.android.volley.toolbox.ImageLoader; /** * * @author <a href="mailto:">TakuyaKodama</a> (kodama-t) * @version 1.00 14/01/20 kodama-t */ public class LruImageCache implements ImageLoader.ImageCache { private LruCache<String, Bitmap> mLruCache; public LruImageCache() { int maxSize = 5 * 1024 * 1024; mLruCache = new LruCache<String, Bitmap>(maxSize); } @Override public Bitmap getBitmap(String url) { return mLruCache.get(url); } @Override public void putBitmap(String url, Bitmap bitmap) { mLruCache.put(url, bitmap); } }