-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamic blur in dialog #167
Comments
i've tried to change setHasFixedTransformationMatrix, but it doesnt helps |
Edit: This was the workaround solution that I used for my own project. The developer posted his own official solution below. The BlurView only re-renders if the focused area has something moving in it (aka the dialog). I was able to get scrolling to work if I added a small View inside the dialog that was constantly animating (for me it was scaling), and then make the View transparent. Dialog You can choose how long to animate it for, but I chose a minute since the scrollview wouldn't be able to scroll for that long without user input. |
@chriscross12324 thanks a lot, just placed progress bar under blur view with transparent color and all works fine |
Glad it worked |
That's not exactly true, but thanks for the workaround suggestion. The fix is probably to change the public BlurViewFacade setBlurAutoUpdate(final boolean enabled) {
blurView.getViewTreeObserver().removeOnPreDrawListener(drawListener);
if (enabled) {
blurView.getViewTreeObserver().addOnPreDrawListener(drawListener);
}
return this;
} This way it will redraw on changes in the rootView's Window, which makes more sense and should fix this particular bug. |
Learn something new everyday. Thanks @Dimezis |
This should be fixed in 2.0.0 |
i need any advise to make blur working on dialog, while activity under it is scrolling
`class CustomDialog(@LayoutRes private val layoutId: Int,
private val title: Text?,
private val message: Text?,
private val cancellable: Boolean = true) :
DialogFragment() {
}
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="335dp"
android:layout_height="wrap_content"
android:background="@color/transparent"
app:cardCornerRadius="12dp"
app:cardElevation="0dp">
</androidx.cardview.widget.CardView>`
Here is how i use blur on dialog, its all working fine but not overdrawing while activity is scrolling
The text was updated successfully, but these errors were encountered: