安卓Glide引入:
// Glide 库
implementation 'com.github.bumptech.glide:glide:3.7.0'
// Glide 高斯模糊库
implementation 'jp.wasabeef:glide-transformations:2.0.1'
网络访问权限:
<uses-permission android:name="android.permission.INTERNET" />
Glide 使用方法:
Glide.with(this)
.load("你的图片地址")
.into(imageView);
Glide配合Glide高斯模糊库
Glide.with(this)
.load("你的图片地址")
.bitmapTransform(new BlurTransformation(this, 高斯模糊radius, 图片压缩度))
.into(imageView);
// 高斯模糊radius : 1-25,越高越模糊
// 图片压缩度 数字越大压缩的越小 一般4-10左右最优。