diff --git a/OsmAnd/res/layout/dashboard_toolbar.xml b/OsmAnd/res/layout/dashboard_toolbar.xml
index be172f96d0..96de5b7fa9 100644
--- a/OsmAnd/res/layout/dashboard_toolbar.xml
+++ b/OsmAnd/res/layout/dashboard_toolbar.xml
@@ -47,6 +47,35 @@
android:scaleType="center"
android:src="@drawable/ic_action_settings_dark" />
+
+
+
+
+
+
+
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index a90c7459f0..d36365dcdf 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -84,13 +84,10 @@ public class MapActivityActions implements DialogProvider {
private OsmandSettings settings;
private RoutingHelper routingHelper;
- private WaypointDialogHelper waypointDialogHelper;
-
public MapActivityActions(MapActivity mapActivity){
this.mapActivity = mapActivity;
settings = mapActivity.getMyApplication().getSettings();
routingHelper = mapActivity.getMyApplication().getRoutingHelper();
- waypointDialogHelper = new WaypointDialogHelper(mapActivity);
}
@@ -546,7 +543,7 @@ public class MapActivityActions implements DialogProvider {
}
- private ContextMenuAdapter createMainOptionsMenu() {
+ public ContextMenuAdapter createMainOptionsMenu() {
final OsmandMapTileView mapView = mapActivity.getMapView();
final OsmandApplication app = mapActivity.getMyApplication();
ContextMenuAdapter optionsMenuHelper = new ContextMenuAdapter(app);
@@ -631,7 +628,7 @@ public class MapActivityActions implements DialogProvider {
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter> adapter, int itemId, int pos, boolean isChecked) {
- showWaypointsInDrawer(false);
+ mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS);
return false;
}
}).reg();
@@ -692,8 +689,7 @@ public class MapActivityActions implements DialogProvider {
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter> adapter, int itemId, int pos, boolean isChecked) {
- mapActivity.getDashboard().setListAdapter(new ConfigureMapMenu().createListAdapter(mapActivity),
- DashboardType.CONFIGURE_MAP);
+ mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_MAP);
return false;
}
}).reg();
@@ -702,8 +698,7 @@ public class MapActivityActions implements DialogProvider {
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter> adapter, int itemId, int pos, boolean isChecked) {
- ContextMenuAdapter cm = mapActivity.getMapLayers().getMapInfoLayer().getViewConfigureMenuAdapter();
- mapActivity.getDashboard().setListAdapter(cm, DashboardType.CONFIGURE_SCREEN);
+ mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_SCREEN);
return false;
}
}).reg();
@@ -767,24 +762,9 @@ public class MapActivityActions implements DialogProvider {
return optionsMenuHelper;
}
- public void showWaypointsInDrawer(boolean flat) {
- final int[] running = new int[] { -1 };
- ArrayAdapter