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

Feature Request: Add doubleClickListener #47

Open
AniruddhaChattopadhyay opened this issue May 17, 2022 · 0 comments
Open

Feature Request: Add doubleClickListener #47

AniruddhaChattopadhyay opened this issue May 17, 2022 · 0 comments

Comments

@AniruddhaChattopadhyay
Copy link

Feature Request

Hey @saket, ​Amazing library. Has really helped out a lot. I have a new feature request to make. Currently, only single click and long click listeners are available in Better-Link-Movement-Method. It would be great if a double-tap listener is also made available in addition to these listeners.

Use Cases

There are a lot of use cases, one of the most prominent being double-tap to like a post (like that on Instagram). So anyone who is building a feed that contains posts with text, images, and videos might want to include the double-tap to like feature. A lot of the posts do have links in them, now for the links, one can use Better-Link-Movement-Method to handle the click events, but then the double-tap to like feature goes for a toss. To have an onTouchListener on the entire textView and use gestureDetector to detect double click is an option but then on clicking the link the onTouch of the textView is triggered thus link handling is undone.

Solution

The Solution I have used in my case is to extend BetterLinkMovement to my own class and then create an OnDoubleClickListener there to handle the double clicks. If we can include the listener in the library itself, that would help out of a lot of people. I can work on this feature if you want

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

1 participant