wasabeef / Blurry

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

Request: Blurry.Delete() with Animation #104

Open R-Ashh opened 3 years ago

R-Ashh commented 3 years ago

Thanks to the Support team whoever trying to do something for the community, I have a suggestion to make this library better, it would be awesome if the Blurry.Delete() method can accept Animation with duration so it won't go away all at once. Thanks in advance.

bernatdelgado87 commented 2 years ago

Is I recently commented at https://github.com/wasabeef/Blurry/issues/45 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()
           }