Example usage for android.support.v4.util LruCache maxSize

List of usage examples for android.support.v4.util LruCache maxSize

Introduction

In this page you can find the example usage for android.support.v4.util LruCache maxSize.

Prototype

int maxSize

To view the source code for android.support.v4.util LruCache maxSize.

Click Source Link

Usage

From source file:com.robopupu.api.component.BitmapManagerImpl.java

public int getCacheSize(final String cacheName) {
    final LruCache<String, Bitmap> cache = bitmapCaches.get(cacheName);
    return cache.maxSize();
}

From source file:com.robopupu.api.component.BitmapManagerImpl.java

public void clearCache(final String cacheName) {
    final LruCache<String, Bitmap> cache = bitmapCaches.get(cacheName);
    final int cacheSize = cache.maxSize();
    cache.trimToSize(0);//from  ww  w .ja  v  a 2s.  c om
    cache.trimToSize(cacheSize);
}

From source file:org.fuusio.api.graphics.BitmapManagerImpl.java

public void clearCache(final String cacheName) {
    final LruCache<String, Bitmap> cache = mBitmacaches.get(cacheName);
    final int cacheSize = cache.maxSize();

    assert (cache != null);

    cache.trimToSize(0);//w ww . j  ava2s .  c o m
    cache.trimToSize(cacheSize);
}

From source file:org.fuusio.api.graphics.BitmapManagerImpl.java

public int getCacheSize(final String cacheName) {
    final LruCache<String, Bitmap> cache = mBitmacaches.get(cacheName);

    assert (cache != null);

    return cache.maxSize();
}