我有SimpleDraweeView(Fresco)。在模糊后如何返回原始图像?
模糊代码:
val blurController = Fresco.newDraweeControllerBuilder()
.setImageRequest(
ImageRequestBuilder.newBuilderWithSource(Uri.parse(imageUrl))
.setPostprocessor(IterativeBoxBlurPostProcessor(7))
.build()
)
.setOldController(image.controller)
.build()
image.controller = blurController
答案 0 :(得分:0)
您可以像这样简单地为uri
设置SimpleDraweeView
:
var offBlur=view.findViewById<ImageButton>(R.id.blur_off)
offBlur.setOnClickListener {
image.setImageURI(uri) // this line
}
再次设置uri
后,模糊效果将消失。