0

Im trying to make the imageview named wallpaper blurry. I tried to do this with glide and it worked to some extent, but it didn't work out the way I wanted it to. Below is the code.

Glide.with(this)
     .load(drawableList[index])
     .override(10, 10) 
     .into(wallpaper);

I was trying to make the image seems foggy but this one didn't look that way. Now I am trying to use library Blurry from jp.wasabeef.blurry.Blurry but the app keeps crashing.

val wallpaper = findViewById<ImageView>(R.id.wallpaper)
wallpaper.setImageResource(drawableList[index])
    
val group = findViewById<ViewGroup>(R.id.group)
Blurry.with(this).radius(25).sampling(2).onto(group)
Blurry.with(this).capture(group).into(sallpaper)

following the instruction of https://github.com/wasabeef/Blurry , I made a viewgroup consist of wallpaper and adjusted minSDK to over 21. There were no error in the code, but the app doesn't open and keeps crashing. How should I do? Is there any other way to blur images?

1 Answers1

0

use 'jp.wasabeef:glide-transformations:x.x.x library and where u need to blur image apply this code in your view

Glide.with(this)
.load(R.drawable.demo)
.apply(bitmapTransform(BlurTransformation(25, 3)))
.into(imageView)
Rohit Jakhar
  • 1,231
  • 2
  • 12
  • 21