From d731404295bcbbfdbd0051091e8b02074d3eaa35 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 13 Sep 2016 19:18:47 +0300 Subject: [PATCH] Fix #2998 --- .../net/osmand/plus/views/ContextMenuLayer.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java index 9c8755873d..f9aeae75ca 100644 --- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java @@ -61,6 +61,7 @@ public class ContextMenuLayer extends OsmandMapLayer { private IContextMenuProvider selectedObjectContextMenuProvider; private boolean cancelApplyingNewMarkerPosition; private LatLon applyingMarkerLatLon; + private boolean wasCollapseButtonVisible; public ContextMenuLayer(MapActivity activity) { this.activity = activity; @@ -268,6 +269,12 @@ public class ContextMenuLayer extends OsmandMapLayer { mInChangeMarkerPositionMode = false; mark(View.VISIBLE, R.id.map_ruler_layout, R.id.map_left_widgets_panel, R.id.map_right_widgets_panel, R.id.map_center_info); + + View collapseButton = activity.findViewById(R.id.map_collapse_button); + if (collapseButton != null && wasCollapseButtonVisible) { + collapseButton.setVisibility(View.VISIBLE); + } + } private void enterMovingMode(RotatedTileBox tileBox) { @@ -290,6 +297,14 @@ public class ContextMenuLayer extends OsmandMapLayer { mark(View.INVISIBLE, R.id.map_ruler_layout, R.id.map_left_widgets_panel, R.id.map_right_widgets_panel, R.id.map_center_info); + View collapseButton = activity.findViewById(R.id.map_collapse_button); + if (collapseButton != null && collapseButton.getVisibility() == View.VISIBLE) { + wasCollapseButtonVisible = true; + collapseButton.setVisibility(View.INVISIBLE); + } else { + wasCollapseButtonVisible = false; + } + view.refreshMap(); }