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

Option to switch arrow orientation based on the tooltip position #147

Closed
anukmc opened this issue Jan 26, 2021 · 4 comments
Closed

Option to switch arrow orientation based on the tooltip position #147

anukmc opened this issue Jan 26, 2021 · 4 comments
Assignees
Labels
Released Released already on the latest version.

Comments

@anukmc
Copy link

anukmc commented Jan 26, 2021

Is your feature request related to a problem?

It would be nice to be able to switch the arrow orientation if the tooltip is rendered above or below the anchor view.
So for example, if the tooltip is shown by using showAlignBottom() but it's actually shown on top of the anchor view because there is no space to display it, the arrow should switch as well.

Describe the solution you'd like:

Before showing tooltip for the first time detect wether the tooltip will be rendered above or below the anchor view by calculating the difference between the anchor position and the height of screen while taking into account the height of the tooltip. Based on that show the arrow with the correct orientation.

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

skydoves commented Jan 28, 2021

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

@anukmc
Copy link
Author

anukmc commented Jan 28, 2021

Thank you for this. Now it's working.
But it seems that what setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR) did before (meaning, if an arrowPosition is 0.5, the arrow will be positioned center of the anchor view.) is not working anymore.
Is this an issue or there is a different setting for that and I am missing something?

@skydoves
Copy link
Owner

ArrowConstraints renamed to ArrowPositionRules.
Thanks :)

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

anukmc commented Jan 28, 2021

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