Dimezis / BlurView

Dynamic iOS-like blur of underlying Views for Android
Apache License 2.0
3.48k stars 331 forks source link

Will it support Compose UI? #212

Open Vocaloid2048 opened 5 months ago

Vocaloid2048 commented 5 months ago

Thanks for devs' hard work, it's a nice repo! Although I've noticed that the last release was 9 months ago Still, may I know will there are any plans to develop a version that supports / is adaptable for Compose UI? Thx if possible!

Dimezis commented 5 months ago

If you're having this issue with Compose, there's not much I can do. Something breaks in Compose when it's being rendered to an external software canvas, and it's a deal breaker for this library. I will report this to Compose team, since it's also reproducible with a much simpler code sample than the whole blur flow, but don't hold your breath for this to be fixed.

If they won't fix it, one thing I can do is migrate the library to hardware rendering snapshotting, but that will work only from API 31, and might even be not feasible at all.

Another option is to create a dedicated Composable that will work only for Compose, but I don't want to invest time in this, since other libraries like Haze are already doing it (although the blur also works only from API 31). I'm considering contributing to Haze to implement blur on older Android versions, but can't promise anything.

So to answer your question, the chances are slim 🙂

Vocaloid2048 commented 5 months ago

Thx for your reply and help, I know it's hard to develop it, and I'll try the suggestions u provided!