wasabeef / Blurry

Blurry is an easy blur library for Android
Apache License 2.0
5.57k stars 602 forks source link

Blurry.delete().animate()? #45

Open jbmlaird opened 7 years ago

jbmlaird commented 7 years ago

Is there any way to remove the blur via an animation? Currently it seems Blurry.delete(ViewGroup) is all that exists.

I can use animateLayoutChanges=true on the rootview but as I'm using a DrawerLayout this also animates the Navigation drawer which I would like to avoid.

xjpmauricio commented 7 years ago

that would be nice!

aslhdyt commented 6 years ago

im waiting for this too

SUMIT5321 commented 6 years ago

Any updates on deleting blur with animation

bernatdelgado87 commented 2 years ago

This is a workaround to make this. Hope works for you :)

val view: View = rootView.findViewWithTag<View>(Blurry::class.java.simpleName)
            if (view != null) {
                view.animate()
                    .alpha(0f)
                    .setDuration(50)
                    .withEndAction {
                        (rootView as ViewGroup).removeView(view)
                    }
                    .start()
            }