-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
BlurView does not honour changes to scaleX/scaleY #183
Comments
It seems PreDrawBlurController does not properly detect the changes to scaleX/scaleY and does not update its internal state. Calling setupWith() creates the controller and its state however it seem to be fairly heavy. Is there a way to update controller state without recreating it from scratch. It seem like BlurView.onSizeChanged() does exactly that. |
Weird stuff.
Yes, it recreates the bitmap among other stuff, so it's better to avoid it
Essentially it's almost as heavy as the So I'm not even sure which part of |
Funny thing is it seems to break only in the vertical direction, on the horizontal direction all seems fine. In any case let me know if I can help in any way to track this down. |
So in case you need a quick fix, you can fork the library and change The problem is that I can't take the I'm not yet sure it's the cleanest or the most correct fix, and it still doesn't explain why |
@Dimezis, I have modified setupInternalCanvasMatrix() as per your suggestion. To get the proper scaleX/scaleY value I've modified the sample to call setupWith() with the view that has scaleX/scaleY applied i.e. the CardView. You can pull the changes from my branch and see the result. The sample seems to work as expected now the only problem being that the BlurView captures the click animation which is to be expected I guess - in my real app this should not be a problem though since the image covers the whole ImageView area. |
Please include:
Library version: 2.0.2
Device and OS version: any
Detailed steps to reproduce the issue:
looking at the bottom of the card.
I was able to make it work as expected by invoking setupWith() after setting scaleX/scaleY. Look at the modified
ExampleListAdapter and uncomment the commented line in the card onClick() listener to see it work as expected.
BlurView.mp4
The text was updated successfully, but these errors were encountered: