
Glide
文章平均质量分 52
Android格调小窝
啦啦啦
展开
-
Glide的优化,开发中使用Glide遇到的问题
Glide加载图片变绿原因,Glide默认加载图片的格式是DecodeFormat.PREFER_RGB_565,缺少ALPHA通道,导致加载图片变绿。解决方案 Glide.setup(new GlideBuilder(context).setDecodeFormat(DecodeFormat.PREFER_ARGB_8888));1Glide在弱网状态下加载大图片,失败几率很大。解决方案,配置自己的网络栈,前提:我用的是Retrofit2,其内部使用的是OkHttp3.配置..原创 2021-03-10 16:38:28 · 875 阅读 · 0 评论 -
Android图片加载框架Fresco,Glide,Picasso对比分析
背景简介:Picasso是2013年Square发布的图片加载框架,Square公司开源了很多优秀的框架,如:okhttp,retrofit等,正所谓Square出品必属精品;Glide是2014年Google员工提出的,并且在很多Google APP中大量采用,也是Google官方推荐的图片加载框架;Fresco是2015年Facebook开源的图片框架。Picasso 与 Glide对比 相似 Glide 和 Picasso在API的调用上 非常相似,且都支持图片的内存缓存,都是非常优秀.原创 2020-11-20 17:13:42 · 1052 阅读 · 1 评论 -
Glide4.9.0加载网络图片模糊变形,加载大图
ImageView imageView = (ImageView) holder.mView.findViewById( R.id.iv_pic );//默认格式RGB_565使用内存是ARGB_8888的一半,但是图片质量就没那么高了,而且不支持透明度。完整代码如下:Glide.with( mContext ) .asBitmap() .load( pict...原创 2020-01-02 09:14:51 · 2280 阅读 · 0 评论 -
Android - 图片处理之Glide4.+版本的用法
一:GitHubbumptech/glide二:下载使用点击,跳转到官网,介绍很详细1. Gradlerepositories { mavenCentral() maven { url 'https://maven.google.com' }}dependencies { compile 'com.github.bumptech.glide:glid...原创 2019-09-26 16:55:31 · 1512 阅读 · 0 评论 -
Glide 4.0+设置 圆角和高斯模糊(BlurTransformation),直接拿到项目中用
// 圆角和高斯模糊,设置模糊度(在0.0到25.0之间),默认”25";"4":图片缩放比例,默认“1” MultiTransformation multi = new MultiTransformation( new BlurTransformation( 25, 1 ), ...原创 2019-10-10 14:30:21 · 11114 阅读 · 4 评论