Android LruCache Adding a Bitmap(Resource) to the cache

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


To add a resource to the cache you must provide a key and the resource. First make sure that the value is not in the cache already

public void addResourceToMemoryCache(String key, Bitmap resource) {
    if (memoryCache.get(key) == null)
        memoryCache.put(key, resource);

Got any Android Question?