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

Only zoom in/out on ACTION_UP event #1775

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Only zoom in/out on ACTION_UP event #1775

merged 1 commit into from
Feb 23, 2022

Conversation

hauke96
Copy link
Contributor

@hauke96 hauke96 commented Feb 23, 2022

This fixes issue #1733. I tested this by building the osmdroid-android project and manually loading the resulting library into my app. The unwanted behavior described in #1733 is gone: Only one zoom takes place when I tap long on the zoom in or out button.

Copy link
Collaborator

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Thank you @hauke96!

Copy link

@tvaknin tvaknin left a comment

Choose a reason for hiding this comment

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

Probably the root cause of this bug: #1822.
can you revert this, please?

@hauke96
Copy link
Contributor Author

hauke96 commented Sep 25, 2022

I don't think my changes are the root cause of bug #1822 . I don't understand why a long-press event is fired anyway, the isTouched function has nothing directly to do with it. Probably the calling code misinterprets the returned false value and triggers a long-press event.

Simply reverting my PR will reintroduce the bug #1733, so I won't just undo my changes. Unfortunately I don't have the time to look into this right now.

@InI4
Copy link
Contributor

InI4 commented Jan 26, 2023

@hauke96 as I figure, your code changes the code where the zoom button decides to be responsible, not where the actual (at times doubled) zoom is being done. Thus, as the button claims not responsible, the one event you removed from detection, isn't captured and leaked to the next overlay. As buttons are often held, this can often result in LongPress events up the listener hierarchy. This is of course not happen for everyone, as many UIs might not respond at all to the resulting LongPress event. However for my app this messed up subsequent Osmdroid releases.

Would be helpful, someone verified and hopefully pulled my pull request, so I can move back to master branch. @monsieurtanuki ?

@monsieurtanuki
Copy link
Collaborator

@InI4 You mean #1876?

@InI4
Copy link
Contributor

InI4 commented Nov 20, 2023

Oh, my projects run so unsmooth, I apologize. Yes, I mean pull #1876, @monsieurtanuki. osmdroid 6.1.17 still bugging for me.

@monsieurtanuki
Copy link
Collaborator

@InI4 Actually I'm not active on osmdroid anymore :-(

spyhunter99 pushed a commit that referenced this pull request Aug 17, 2024
Co-authored-by: frank <frank+git@spieleck.de>
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

Successfully merging this pull request may close these issues.

4 participants