private static LruCache<String, Bitmap> drawableCache;
drawableCache = new LruCache<String, Bitmap>(CACHE_MAX_SIZE) {
@Override
protected void entryRemoved(boolean evicted, String key, Bitmap oldValue, Bitmap newValue) {
if (oldValue != newValue)
oldValue.recycle();
}
};
android开发:LruCache
最新推荐文章于 2023-03-17 17:59:41 发布