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

Tooltips inside when recycler view cell goes out of viewport #26

Closed
ivnsch opened this issue Mar 24, 2020 · 4 comments
Closed

Tooltips inside when recycler view cell goes out of viewport #26

ivnsch opened this issue Mar 24, 2020 · 4 comments

Comments

@ivnsch
Copy link

ivnsch commented Mar 24, 2020

Please complete the following information:

  • Library Version 1.1.2
  • Affected Device(s) Emulator

When I open a tooltip inside a recycler view cell and scroll such that the cell goes outside the view port, the tooltip stays inside (at the edge). This looks weird as it's not pointing to anything anymore.

Is it possible to make it go out of the screen together with the cell (and back in)?

Settings

setArrowSize(10)
//        setWidthRatio(1.0f)
setHeight(65)
setPadding(0)
//        setDismissWhenTouchOutside(true)
setPaddingLeft(10)
setPaddingRight(10)
//        setArrowPosition(.5f)
setSpace(10)
setCornerRadius(10f)
setAlpha(1f)
setTextColorResource(R.color.white)
setBackgroundColorResource(R.color.colorAccent)
setOnBalloonClickListener {
    onClick?.invoke()
}
setBalloonAnimation(BalloonAnimation.ELASTIC)
setLifecycleOwner(lifecycleOwner)

Note that setDismissWhenTouchOutside is commented. I don't want the tooltips to disappear immediately.

Screen Shot 2020-03-24 at 16 05 16

The tooltip showing in the screenshot belongs to an item that's outside (top) of the screen.

@skydoves
Copy link
Owner

It seems related to this issue from the usage of popupwindow. I will check out it soon usage in the RecyclerView.

@ivnsch
Copy link
Author

ivnsch commented Mar 27, 2020

Hi @skydoves thanks for your quick replies. I just wanted to ask if you think all the issues can be realistically fixed soon? Or do you have maybe any indicators for me to try to fix? We have a bit of time pressure.

@skydoves
Copy link
Owner

Hi, I've been thinking about this for some days, but there is no way to resolve this problem.
The concept of the window is an abstract base class for a top-level window look and behavior policy. So the window is never subordinated by views. You can use the balloon instead of the ContextMenu.
More lightweight and fully customizable with animation.
So the best case is, use with the setDismissWhenTouchOutside or call dismiss manually when the recyclerView is scrolled. Anyway, thank you for your issue :)

@ivnsch
Copy link
Author

ivnsch commented Apr 3, 2020

Makes sense.

@ivnsch ivnsch closed this as completed Apr 3, 2020
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