public static class VolleyUtil.BitmapLruCache
extends android.support.v4.util.LruCache<java.lang.String,android.graphics.Bitmap>
implements com.android.volley.toolbox.ImageLoader.ImageCache
VolleyUtil.BitmapLruCache
is an implementation of ImageLoader.ImageCache
that stores bitmaps (in memory) to a maximum number of bytes.Constructor and Description |
---|
BitmapLruCache(int maxBytes) |
Modifier and Type | Method and Description |
---|---|
android.graphics.Bitmap |
getBitmap(java.lang.String url) |
void |
putBitmap(java.lang.String url,
android.graphics.Bitmap bitmap) |
protected int |
sizeOf(java.lang.String key,
android.graphics.Bitmap value)
Returns the size of the entry for
key and value in
user-defined units. |
protected int sizeOf(java.lang.String key, android.graphics.Bitmap value)
android.support.v4.util.LruCache
key
and value
in
user-defined units. The default implementation returns 1 so that size
is the number of entries and max size is the maximum number of entries.
An entry's size must not change while it is in the cache.
sizeOf
in class android.support.v4.util.LruCache<java.lang.String,android.graphics.Bitmap>
public android.graphics.Bitmap getBitmap(java.lang.String url)
getBitmap
in interface com.android.volley.toolbox.ImageLoader.ImageCache
public void putBitmap(java.lang.String url, android.graphics.Bitmap bitmap)
putBitmap
in interface com.android.volley.toolbox.ImageLoader.ImageCache