0
点赞
收藏
分享

微信扫一扫

Glide刷新图片闪啊闪


Glide加载图片,加上 dontAnimate() ,再把 skipMemoryCache 设置为false(可不设置,默认为 false)具体如下:

Glide.with(context).load(url)
           .error(error)
           .skipMemoryCache(false)
           .dontAnimate()
           .into(imageView);

注意:在使用 Glide 时,xml 文件中 ImageView 的 src属性 不要设置图片,否则加载会闪,如需设置应该设置 background 属性

 


举报

相关推荐

0 条评论