Closed hmmmk closed 1 month ago
I have a suspicion about the root cause. It would help if you could share a sample project
@Dimezis can I invite you to a closed repo with the project itself? I think it's better to you to check this one in real-case scenario. I will point to the files where I set up BlurView
Sure, that would work for me too
@Dimezis sent an invite. The BlurView is used in PurchaseFragmentBottomSheet.kt at line 101
@Dimezis any updates on this issue?
@hmmmk I am not able to go through the signup process in your app, please just extract the problematic place into a separate example project, or provide a simple way to reproduce the issue in this project.
@Dimezis okay, I made a branch called blurtest. If you build this branch it will open screen where you should just press on a button with a big heart, it will open BottomSheetFragment, and you'll see the issue
I don't see the bottom sheet
@Dimezis
Go to the first page and press on the button that I highlited on a screenshot
Version 2.0.5 should fix this issue.
But you also have a different problem - you select a rootView
that doesn't include the bottom bar, so it's not getting blurred.
Version 2.0.5 should fix this issue. But you also have a different problem - you select a
rootView
that doesn't include the bottom bar, so it's not getting blurred.
But I select rootView of the whole activity, how it doesn't include bottom bar?
But I select rootView of the whole activity, how it doesn't include bottom bar?
You don't. Well, not on this branch anyway. This code from your first post is nowhere to be seen in your project.
val rootView = requireActivity().window.decorView as ViewGroup
bgView.setupWith(rootView)
Your setup looks like this instead:
val rootView = requireParentFragment().requireParentFragment().requireParentFragment().view as ViewGroup
bgView.setupWith(rootView)
But I select rootView of the whole activity, how it doesn't include bottom bar?
You don't. Well, not on this branch anyway. This code from your first post is nowhere to be seen in your project.
val rootView = requireActivity().window.decorView as ViewGroup bgView.setupWith(rootView)
Your setup looks like this instead:
val rootView = requireParentFragment().requireParentFragment().requireParentFragment().view as ViewGroup bgView.setupWith(rootView)
Yep, you right. I forgot about this. But anyway, I tried to put 2.0.5 and it's still not working as expected
@Dimezis I tried version-2.0.5 but getting this error
Could not find com.github.Dimezis:BlurView:version-2.0.5. 2.0.4 is working fine for me
implementation ("com.github.Dimezis:BlurView:version-2.0.5")
@krupalivaghasiya24 @janbolat Should be good now
@Dimezis any ideas on how to improve performance when using BlurView as BottomSheetDialogFragment background?
RenderEffectBlur
should be more performant
@Dimezis okay, despite that, the issue is solved
I'm trying to make dynamic blur for a BottomSheetDialog fragment. But the thing is, that BlurView correctly takes snapshot of underlying content and blurs it, but only statically. When I'm trying to move my bottom sheet fragment up and down, blur remains the same, and I want to make it to change when bottom sheet is moving.
Here is how I enable it in the kotlin code:
In the XML layout of BottomSheetDialogFragment, BlurView is just top element of all hierarchy.