logo
  • 教程列表
  • SO官方文檔
  • LruCache
    • 將點陣圖(資源)新增到快取
    • 初始化快取
    • 從快取中獲取點陣圖(Resouce)
  1. StackOverflow 文件
  2. Android 教程
  3. LruCache
  4. 將點陣圖(資源)新增到快取

將點陣圖(資源)新增到快取

Created: November-22, 2018

要將資源新增到快取,你必須提供金鑰和資源。首先確保該值不在快取中

public void addResourceToMemoryCache(String key, Bitmap resource) {
    if (memoryCache.get(key) == null)
        memoryCache.put(key, resource);
}
  • 初始化快取
  • LruCache

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明