From 2562ef6337942f20b52a87b5e623b9a67fcf77e7 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 27 Feb 2018 17:27:40 +0200 Subject: [PATCH 1/2] fixed bug in parking context menu --- .../src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java index f45d8b0040..04dd8ce21d 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java @@ -288,6 +288,7 @@ public class ParkingPositionPlugin extends OsmandPlugin { if (parkingLayer != null) { MapContextMenu menu = mapActivity.getContextMenu(); if (menu.isVisible()) { + menu.hide(false); menu.show(new LatLon(parkingPosition.getLatitude(), parkingPosition.getLongitude()), parkingLayer.getObjectName(parkingPosition), parkingPosition); } From 164ccc0dbf777b84f8ad582c4499796b4cf2a167 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 27 Feb 2018 17:44:59 +0200 Subject: [PATCH 2/2] added removing animation after choosing "Time-unlimited" --- .../osmand/plus/parkingpoint/ParkingPositionPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java index 04dd8ce21d..01b93c7756 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java @@ -268,7 +268,7 @@ public class ParkingPositionPlugin extends OsmandPlugin { } addOrRemoveParkingEvent(false); setParkingPosition(mapActivity, latitude, longitude, false); - showContextMenuIfNeeded(mapActivity); + showContextMenuIfNeeded(mapActivity,true); mapActivity.getMapView().refreshMap(); } else if (index == 2) { if (wasEventPreviouslyAdded) { @@ -284,11 +284,11 @@ public class ParkingPositionPlugin extends OsmandPlugin { builder.create().show(); } - private void showContextMenuIfNeeded(final MapActivity mapActivity) { + private void showContextMenuIfNeeded(final MapActivity mapActivity, boolean animated) { if (parkingLayer != null) { MapContextMenu menu = mapActivity.getContextMenu(); if (menu.isVisible()) { - menu.hide(false); + menu.hide(animated); menu.show(new LatLon(parkingPosition.getLatitude(), parkingPosition.getLongitude()), parkingLayer.getObjectName(parkingPosition), parkingPosition); } @@ -389,7 +389,7 @@ public class ParkingPositionPlugin extends OsmandPlugin { } else { addOrRemoveParkingEvent(false); } - showContextMenuIfNeeded(mapActivity); + showContextMenuIfNeeded(mapActivity,false); } }); setTime.create();