-
Notifications
You must be signed in to change notification settings - Fork 27
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
Not able to navigate a zoomed image. Swiping takes to second image instead of showing the section of zoomed image #17
Comments
You can solve this problem by using the following class instead of Android's regular If you don't use the v4 library version of The sample app that demonstrates the library is included in this project so you could both check out the Play Store listing and the source code to see how you can make things work. Please let me know if this solved your problem! |
That ImageViewPager worked great. Thanks @martinwithaar Also do you know how I can get only the zoomed visible drawable bitmap from imageview? not the entire image. Only the zoomed visible portion. |
or how to get the zoom scale & calculate relative (x, y) position of touched point? The problem is OCR gives x, y position of text block from original image. When I zoom it I don't know the x, y position of the zoomed text block that's visible. Here I am getting the text block x, y from OCR https://github.com/onedrupal/One-Drupal-Android/blob/master/app/src/main/java/com/technikh/onedrupal/activities/ViewImageActivity.java#L262
I am painting a yellow rectangular box surrounding the text word
I am looping through all the rectangular yellow painted boxes and finding a match for the box the user just touched. This works if not zoomed. When zoomed the x, y is different and I don't know how to get the relative x, y position of touched point with respect to the original image dimensions.
|
I am not able to navigate a zoomed image. Swiping takes to second image instead of showing the section of the zoomed image.
Bug explained in this video at https://www.youtube.com/watch?v=_9XjgVCqIOg&t=300
Note that I should also be able to listen to longclick on a zoomed image. Currently I am able to detect longpress using GestureDetector as shown here https://github.com/onedrupal/One-Drupal-Android/blob/master/app/src/main/java/com/technikh/onedrupal/activities/ViewImageActivity.java#L188
Also I am not able to send the zoomed section to OCR detection(Google firebase ML Kit). I am only able to send the full image at https://github.com/onedrupal/One-Drupal-Android/blob/master/app/src/main/java/com/technikh/onedrupal/activities/ViewImageActivity.java#L240
The text was updated successfully, but these errors were encountered: