From 05af6974fe40776ad1e0403ed8ee59efec5073ed Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 29 Oct 2019 13:08:27 +0300 Subject: [PATCH] Fix #7748 --- .../src/net/osmand/plus/activities/MapActivity.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index e43df10182..5029409ced 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -114,6 +114,7 @@ import net.osmand.plus.measurementtool.MeasurementEditingContext; import net.osmand.plus.measurementtool.MeasurementToolFragment; import net.osmand.plus.measurementtool.NewGpxData; import net.osmand.plus.profiles.EditProfileFragment; +import net.osmand.plus.quickaction.QuickActionListFragment; import net.osmand.plus.render.RendererRegistry; import net.osmand.plus.resources.ResourceManager; import net.osmand.plus.routepreparationmenu.ChooseRouteFragment; @@ -682,8 +683,13 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven prevActivityIntent = null; return; } - if (getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed()) + if (getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed()) { return; + } + QuickActionListFragment quickActionListFragment = getQuickActionListFragment(); + if ( quickActionListFragment!=null && quickActionListFragment.isVisible()) { + this.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_SCREEN, null); + } super.onBackPressed(); } @@ -2281,6 +2287,11 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven return fragment != null && !fragment.isDetached() && !fragment.isRemoving() ? (EditProfileFragment) fragment : null; } + public QuickActionListFragment getQuickActionListFragment() { + Fragment fragment = getSupportFragmentManager().findFragmentByTag(QuickActionListFragment.TAG); + return fragment != null && !fragment.isDetached() && !fragment.isRemoving() ? (QuickActionListFragment) fragment : null; + } + public boolean isTopToolbarActive() { MapInfoLayer mapInfoLayer = getMapLayers().getMapInfoLayer(); return mapInfoLayer.hasTopToolbar();