From ab95b5b71b364e029d8293949c490d3af55b7b23 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 4 Apr 2017 17:35:39 +0300 Subject: [PATCH] Fix overlapped menues --- .../mapcontextmenu/other/MapMultiSelectionMenuFragment.java | 5 +++++ .../plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java index d34d87e804..e4eb84d293 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapMultiSelectionMenuFragment.java @@ -75,6 +75,10 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi @Override public void onResume() { super.onResume(); + if (MapRouteInfoMenu.isVisible()) { + dismissMenu(); + return; + } wasDrawerDisabled = menu.getMapActivity().isDrawerDisabled(); if (!wasDrawerDisabled) { menu.getMapActivity().disableDrawer(); @@ -104,6 +108,7 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi if (mapActivity.isActivityDestroyed()) { return; } + mapActivity.getContextMenu().hideMenues(); MapMultiSelectionMenu menu = mapActivity.getContextMenu().getMultiSelectionMenu(); diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java index dc8ecc6501..ebbbdfd1d3 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenuFragment.java @@ -173,9 +173,7 @@ public class MapRouteInfoMenuFragment extends Fragment { slideOutAnim = R.anim.slide_out_left; } - if (mapActivity.getContextMenu().isVisible()) { - mapActivity.getContextMenu().hide(); - } + mapActivity.getContextMenu().hideMenues(); MapRouteInfoMenuFragment fragment = new MapRouteInfoMenuFragment(); mapActivity.getSupportFragmentManager().beginTransaction()