Skip to content
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

Blur Background Position Incorrect #63

Closed
rayliverified opened this issue Feb 9, 2018 · 8 comments
Closed

Blur Background Position Incorrect #63

rayliverified opened this issue Feb 9, 2018 · 8 comments

Comments

@rayliverified
Copy link
Contributor

Amazing library! I'm trying to use it in my AlertView and PermissionsDialogue libraries. Unfortunately, I've ran into a bit of a problem with fragments and the view being duplicated.
maxthonsnap20180209163018
You can see in the picture above that the same background position is displaying on both the top and bottom BlurViews. The BlurView position calculation is not doing anything.
maxthonsnap20180209163705
Another example with only 1 BlurView to illustrate the problem.
maxthonsnap20180209162938
What's puzzling is that the BlurView works correctly when the size is smaller.

Any ideas? I am so close to getting the blur working!

My repo w/ code here -> https://github.com/searchy2/CustomPermissionsDialogue/tree/blur

@rayliverified rayliverified changed the title Blur Background Duplicated Blur Background Position Wrong Feb 9, 2018
@rayliverified rayliverified changed the title Blur Background Position Wrong Blur Background Position Incorrect Feb 9, 2018
@Dimezis
Copy link
Owner

Dimezis commented Feb 11, 2018

Thanks for report and example project, will dig into this soon and hopefully fix it

@rayliverified
Copy link
Contributor Author

@Dimezis I'd be very appreciative if you could take a look. I have such high hopes because the blur background works on one of them because the height is shorter. So something about the height causes the positioning to be wrong.

@Dimezis
Copy link
Owner

Dimezis commented Feb 12, 2018

I think I know what's the problem, will make an update in couple of days with new API to handle your case.

@rayliverified
Copy link
Contributor Author

@Dimezis Please let me know if I can help. I have a few libraries that would really benefit from this feature so it would be great if you share what's wrong.

@Dimezis
Copy link
Owner

Dimezis commented Feb 20, 2018

The issue is that dialog's relative position is always x=0, y=0.
So for the dialog I need a special handling using getLocationInWindow() to know the proper position for blur.
I'll release this soon, I just need a bit of free time

@Dimezis
Copy link
Owner

Dimezis commented Feb 22, 2018

For now you can check out and test your scenario on branch 1.4.0
https://github.com/Dimezis/BlurView/tree/v1.4.0

@rayliverified
Copy link
Contributor Author

Bless you! You are such an amazing person!

maxthonsnap20180222120241

If you can create an release, I'll be able to release my libraries too. Thank you so much!

@rayliverified
Copy link
Contributor Author

One more note, windowIsFloating must be set to false in your dialogue style or the positioning will be incorrect.

<item name="android:windowIsFloating">false</item>

Library works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants