Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Only zoom in/out on ACTION_UP event#1775

Merged
monsieurtanuki merged 1 commit intoosmdroid:masterfrom
hauke96:master
Feb 23, 2022
Merged

Only zoom in/out on ACTION_UP event#1775
monsieurtanuki merged 1 commit intoosmdroid:masterfrom
hauke96:master

Conversation

@hauke96
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

@InI4 You mean #1876?

@InI4
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

spyhunter99 pushed a commit that referenced this pull request Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants