Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Long click options menu for in-text links #11

Merged
merged 1 commit into from
Jan 13, 2019
Merged

Conversation

Tunous
Copy link
Owner

@Tunous Tunous commented Jan 12, 2019

This pull request makes all in-text links display options menu when long clicked.

2019-01-12_13-47-46

@Tunous Tunous added the feature New feature label Jan 12, 2019
@Tunous Tunous added this to the 0.6.3 milestone Jan 12, 2019
@Tunous Tunous merged commit 6f07040 into master Jan 13, 2019
@Tunous Tunous deleted the feature/link-popup branch January 13, 2019 15:57
@Override
public boolean onTouchEvent(TextView view, Spannable text, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {
// A link is potentially going to be clicked.
clickedUrlCoordinates = new Point((int) event.getRawX(), (int) event.getRawY());
} else if (event.getAction() == MotionEvent.ACTION_DOWN) {
touchCoordinates = new Point((int) event.getRawX(), (int) event.getRawY());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can clickedUrlCoordinates not be used here?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm good point, didn't think of that. I guess it should work.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 58cb38d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants