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

bug/#1122 - removed confusion about long press in itemized overlay samples #1262

Merged
merged 1 commit into from Feb 4, 2019

Conversation

Projects
None yet
1 participant
@monsieurtanuki
Copy link
Collaborator

monsieurtanuki commented Feb 4, 2019

Fixed the return value of ItemizedIconOverlay.OnItemGestureListener.onItemLongPress in the samples.
The default expected behavior is that if an item is pressed, the method should return true, in order to prevent other items to be potentially selected as well. This is already the case in method onItemSingleTapUp.
Of course, that doesn't prevent anyone to consider that false is the relevant return value, depending on the purpose of the app. But for the samples, true makes more sense.

For all the following classes, those are the changes:

  • onItemLongPress now returns true when the first item is found
  • minor refactoring in order to remove editor warnings

Impacted classes:

  • SampleMilitaryIconsItemizedIcons
  • SampleWithMinimapItemizedOverlayWithFocus
  • SampleWithMinimapItemizedOverlayWithScale
  • SampleWithMinimapItemizedoverlay
bug/#1122 - removed confusion about long press in itemized overlay sa…
…mples

Fixed the return value of `ItemizedIconOverlay.OnItemGestureListener.onItemLongPress` in the samples.
The default expected behavior is that if an item is pressed, the method should return `true`, in order to prevent other items to be potentially selected as well. This is already the case in method `onItemSingleTapUp`.
Of course, that doesn't prevent anyone to consider that `false` is the relevant return value, depending on the purpose of the app. But for the samples, `true` makes more sense.

For all the following classes, those are the changes:
* `onItemLongPress` now returns `true` when the first item is found
* minor refactoring in order to remove editor warnings

Impacted classes:
* `SampleMilitaryIconsItemizedIcons`
* `SampleWithMinimapItemizedOverlayWithFocus`
* `SampleWithMinimapItemizedOverlayWithScale`
* `SampleWithMinimapItemizedoverlay`

@monsieurtanuki monsieurtanuki merged commit c622325 into master Feb 4, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment