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

Usage inside recyclerview item #4

Closed
Lemedon opened this issue Aug 9, 2019 · 5 comments
Closed

Usage inside recyclerview item #4

Lemedon opened this issue Aug 9, 2019 · 5 comments

Comments

@Lemedon
Copy link

Lemedon commented Aug 9, 2019

Is your feature request related to a problem?

Hi, I've been struggling with the problem of using your library inside recyclerview item. For example I would like to display tooltip after click on circle avatar image at your sample project. It's popups balloon at different items or sometimes just nothing happens after a click event. My implementation is very simple I've used showAlignBottom method inside viewholder.

Describe the solution you'd like:

Could you provide some simple solution how to use you library with recyclerview?

Thanks!

@skydoves
Copy link
Owner

skydoves commented Aug 9, 2019

@Lemedon
Hi, thank you for your interest!
I wrote some sample codes for explaining to implement balloon tooltips inside viewholder.

Here is a SampleViewHolder.

Firstly, declare a balloon property like below.
BalloonUtils is an object class for providing balloon instance.

private val balloon by lazy { BalloonUtils.getProfileBalloonForViewHolder(context(), lifecycleOwner) }

And show using showXX method.
You can set the itemView or any child views as a target.

balloon.showAlignBottom(itemView)

Thank you :)

@Lemedon
Copy link
Author

Lemedon commented Aug 10, 2019

Perfect, now works like a charm. Thanks!

@Lemedon Lemedon closed this as completed Aug 10, 2019
@ivnsch
Copy link

ivnsch commented Mar 19, 2020

@skydoves Is it possible to prevent that the tooltip sticks at the top / bottom when scrolling? I'd like it to just scroll out of the screen together with the cell.

@skydoves
Copy link
Owner

@i-schuetz
Unfortunately, the tooltips can't move once it appears.

@dharamveer-appyhigh
Copy link

@Lemedon Hi, thank you for your interest! I wrote some sample codes for explaining to implement balloon tooltips inside viewholder.

Here is a SampleViewHolder.

Firstly, declare a balloon property like below. BalloonUtils is an object class for providing balloon instance.

private val balloon by lazy { BalloonUtils.getProfileBalloonForViewHolder(context(), lifecycleOwner) }

And show using showXX method. You can set the itemView or any child views as a target.

balloon.showAlignBottom(itemView)

Thank you :)

SampleViewHolder is not accessible.

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

4 participants