【问题标题】:set image in BlurImageView android studio [duplicate]在 BlurImageView android studio中设置图像[重复]
【发布时间】:2021-02-08 18:00:46
【问题描述】:

我有问题。当我使用滑行调整图像时,图像不再模糊。 我能做些什么来解决这个问题? 我将此代码用于 setImage 到 blurimageView

Glide.with(context).asBitmap().load(imgArt).error(R.drawable.imgDefault).into(BlurId)
BlurId.setBlur(20)

【问题讨论】:

  • 只需在 ImageView 上添加另一个具有模糊背景的视图,并在需要显示其他方式时显示它

标签: android image kotlin blur


【解决方案1】:

你可以使用滑翔变换https://github.com/wasabeef/glide-transformations你可以用一行代码模糊图像

   Glide.with(this).load(R.drawable.demo)
  .apply(RequestOptions.bitmapTransform(BlurTransformation(25, 3)))
  .into(imageView)

【讨论】:

  • 为什么无法识别 BlurTransformation 和 bitmapTransform?我应该创建它吗?
  • 库实现了吗?
猜你喜欢
  • 2016-09-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-14
  • 2011-04-10
相关资源
最近更新 更多