public class BitmapLruMemoryCache extends LruMemoryCache<String,android.graphics.Bitmap>
| Constructor and Description |
|---|
BitmapLruMemoryCache(android.content.Context c) |
BitmapLruMemoryCache(int maxSize)
Creates a new cache for storing bitmaps.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isForType(android.graphics.Bitmap value)
Determines if the the cache implementation can store values of the given (already parsed) value
|
protected int |
sizeOf(String key,
CacheEntry<android.graphics.Bitmap> entry)
Returns the size of the entry for
key and value in
user-defined units. |
clear, get, onLowMemory, put, put, remove, updateExpirationTimestamppublic BitmapLruMemoryCache(int maxSize)
maxSize - The max size in bytespublic BitmapLruMemoryCache(android.content.Context c)
protected int sizeOf(String key, CacheEntry<android.graphics.Bitmap> entry)
LruMemoryCachekey 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 LruMemoryCache<String,android.graphics.Bitmap>public boolean isForType(android.graphics.Bitmap value)
MemoryCacheCopyright © 2015 Hannes Dorfmann. All rights reserved.