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

Overlay does not position correctly in bottomsheet containers #141

Closed
justincamp404 opened this issue Jan 16, 2021 · 5 comments
Closed

Overlay does not position correctly in bottomsheet containers #141

justincamp404 opened this issue Jan 16, 2021 · 5 comments
Assignees
Labels
Released Released already on the latest version.

Comments

@justincamp404
Copy link

  • Library Version: 1.3.0
  • Affected Device(s): All, from what I can tell

If you try to display a balloon in a container that utilizes the BottomSheet behavior, the balloon anchors correctly, but the overlay shape does not. This is true whether the bottomsheet container is expanded or not. Please see attached screenshot.

(btw, thank you so much for this awesome library!)
overlay_issue

@justincamp404
Copy link
Author

I managed to fix the position of the overlay in the following way:

val loc = IntArray(2)
anchorView.getLocationInWindow(loc)
balloonBuilder.overlayPosition = Point(loc[0], loc[1] - anchorView.height)

@skydoves
Copy link
Owner

skydoves commented Jan 17, 2021

Hi, is that working correctly if you use getWindowBodyScreenLocation instead of the getLocationInWindow?
Thanks for your issue :)

@justincamp404
Copy link
Author

Hi, I'm a little confused. getWindowBodyScreenLocation appears to be a private function in Balloon.kt so I couldn't directly test that method, however I tested getLocationOnScreen() and that worked as expected.

@skydoves skydoves self-assigned this Jan 24, 2021
@skydoves skydoves added the Release Next This feature will be released on next version label Jan 24, 2021
@skydoves
Copy link
Owner

@justincamp404
It has been released a new version 1.3.1!
Please check about this issue :)

@skydoves skydoves added Released Released already on the latest version. and removed Release Next This feature will be released on next version labels Jan 29, 2021
@justincamp404
Copy link
Author

I apologize for the late response, but I just wanted to formally state that this issue is now resolved for me. The fix works!

Thank you so much!

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

No branches or pull requests

2 participants