android glide load image url with cookie, not show image how?

android glide load image url with cookie, not show image how?,第1张

load(String url) wrong type of parameter ,glideUrl is a istance of GlideUrl not a String obj.

这篇文章给大家介绍下android目前使用比较广泛的一个图片缓存库—Glide,这个库是google的一位开发人员在github上的一个开源项目。目前google的一些官方应用都在使用它,所以你现在就开始放心的用吧。

github地址

Glide基础用法加缓存

添加Glide

在module的build.gradle中添加以下依赖:

compile 'com.github.bumptech.glide:glide:3.7.0'

/** 250 MB of cache. */

int DEFAULT_DISK_CACHE_SIZE = 250 * 1024 * 1024

Glide.get(this).clearMemory()

Glide.get(MainActivity.this).clearDiskCache()

public class WangGlideModule implements GlideModule {

}

<application>

...

</application>

public class WangGlideModule implements GlideModule {

}

public class WangGlideModule implements GlideModule {

}

public class WangGlideModule implements GlideModule {

}

public class WangGlideModule implements GlideModule {

}

public class WangGlideModule implements GlideModule {

}

public class WangGlideModule implements GlideModule {

}

public class WangGlideModule implements GlideModule {

运行后手机文件夹里面多出来一个GlideDisk文件夹,这个就是磁盘缓存的目录


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11183264.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-14
下一篇2023-05-14

发表评论

登录后才能评论

评论列表(0条)

    保存