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

Way to get location of tap outside view? #823

Open
mcclure opened this issue Jul 17, 2022 · 0 comments
Open

Way to get location of tap outside view? #823

mcclure opened this issue Jul 17, 2022 · 0 comments

Comments

@mcclure
Copy link

mcclure commented Jul 17, 2022

I am looking at OnOutsidePhotoTapListener and void onOutsidePhotoTap(ImageView imageView);:

https://github.com/Baseflow/PhotoView/blob/master/photoview/src/main/java/com/github/chrisbanes/photoview/OnOutsidePhotoTapListener.java

🚀 Feature Requests

This callback appears to only say what ImageView the tap was outside of but not where it was.

Contextualize the feature / Describe the feature.

It would be useful to get, if not the exact location of the tap, the nearest point to the tap. As it is, if the user is trying to tap on a point on the edge of the photo view they might have to try several times accidentally tapping on the wrong side of the border.

Expected behavior, if this is possible: onOutsidePhotoTap should have the same signature as void onPhotoTap(ImageView view, float x, float y);. The coordinates returned should (probably) be clamped to the range 0..1, 0..1.

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