美文网首页
Universal-Image-Loader源码解析之图片缓存策

Universal-Image-Loader源码解析之图片缓存策

作者: LeonXtp | 来源:发表于2017-09-13 10:30 被阅读15次
if (memoryCacheSize == 0) {
            ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
            int memoryClass = am.getMemoryClass();
            if (hasHoneycomb() && isLargeHeap(context)) {
                memoryClass = getLargeMemoryClass(am);
            }
            memoryCacheSize = 1024 * 1024 * memoryClass / 8;
        }
return new LruMemoryCache(memoryCacheSize);
uil-cache.png

相关文章

网友评论

      本文标题:Universal-Image-Loader源码解析之图片缓存策

      本文链接:https://www.haomeiwen.com/subject/zrfksxtx.html