UsageExampleLoggingAndStats.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:android-tutorials-picasso 作者:
/**
 * Just like the loadImageBitmapFromMemory() method, we first call fetch() to load the image in our caches.
 * In order to make sure this image does not come from the memory cache, we specifically set the request to ignore the memory cache with .memoryPolicy().
 * This should result in 99% of the cases that the image loads from the disk cache.
 */
private void loadImageBitmapFromDisk() {
    Picasso.with(context).load(UsageExampleListView.eatFoodyImages[1]).fetch(new Callback() {
        @Override
        public void onSuccess() {
            Picasso
                    .with(context)
                    .load(UsageExampleListView.eatFoodyImages[1])
                    .memoryPolicy(MemoryPolicy.NO_CACHE, MemoryPolicy.NO_STORE)
                    .into(imageViewFromDisk);
        }

        @Override
        public void onError() {

        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号