Please sign in to comment.
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`
- Loading branch information...
Showing with 20 additions and 21 deletions.
- +4 −4 ...etMapViewer/src/main/java/org/osmdroid/samplefragments/data/SampleMilitaryIconsItemizedIcons.java
- +3 −4 ...er/src/main/java/org/osmdroid/samplefragments/data/SampleWithMinimapItemizedOverlayWithFocus.java
- +11 −11 ...er/src/main/java/org/osmdroid/samplefragments/data/SampleWithMinimapItemizedOverlayWithScale.java
- +2 −2 OpenStreetMapViewer/src/main/java/org/osmdroid/samples/SampleWithMinimapItemizedoverlay.java