diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index eb08b88bd1..b886d8b2b0 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -12,6 +12,7 @@ --> + %1$s → … Update all maps added to %1$s? • OsmAnd Live updates moved to \"Downloads > Updates\"\n\n diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java index 1bcac88a36..5838bfc1a2 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/MapStyleAction.java @@ -245,4 +245,11 @@ public class MapStyleAction extends SwitchableAction { ? filters.get(0) + " +" + (filters.size() - 1) : filters.get(0); } + + @Override + public String getActionText(OsmandApplication application) { + String currentSource = application.getSettings().RENDERER.get(); + + return application.getString(R.string.map_quick_action_pattern, getTranslatedItemName(application, currentSource)); + } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/MapOverlayAction.java b/OsmAnd/src/net/osmand/plus/rastermaps/MapOverlayAction.java index 7972b264aa..8190b6c995 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/MapOverlayAction.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/MapOverlayAction.java @@ -104,8 +104,8 @@ public class MapOverlayAction extends SwitchableAction> { } int index = -1; - final String currentSource = settings.MAP_OVERLAY.get() == null ? KEY_NO_OVERLAY - : settings.MAP_OVERLAY.get(); + String currentSource = settings.MAP_OVERLAY.get() == null ? KEY_NO_OVERLAY + : settings.MAP_OVERLAY.get(); for (int idx = 0; idx < sources.size(); idx++) { if (sources.get(idx).first.equals(currentSource)) { @@ -224,4 +224,12 @@ public class MapOverlayAction extends SwitchableAction> { getParams().put(KEY_DIALOG, Boolean.toString(((SwitchCompat) root.findViewById(R.id.saveButton)).isChecked())); return super.fillParams(root, activity); } + + @Override + public String getActionText(OsmandApplication application) { + String currentSource = application.getSettings().MAP_OVERLAY.get() == null ? KEY_NO_OVERLAY + : application.getSettings().MAP_OVERLAY.get(); + + return application.getString(R.string.map_quick_action_pattern, getTranslatedItemName(application, currentSource)); + } } diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/MapSourceAction.java b/OsmAnd/src/net/osmand/plus/rastermaps/MapSourceAction.java index b11a8ec812..d81b1f12ed 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/MapSourceAction.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/MapSourceAction.java @@ -91,7 +91,7 @@ public class MapSourceAction extends SwitchableAction> { OsmandSettings settings = activity.getMyApplication().getSettings(); List> sources = loadListFromParams(); if (sources.size() > 0) { - boolean showBottomSheetStyles = Boolean.valueOf(getParams().get(KEY_DIALOG)); + boolean showBottomSheetStyles = Boolean.parseBoolean(getParams().get(KEY_DIALOG)); if (showBottomSheetStyles) { showChooseDialog(activity.getSupportFragmentManager()); return; @@ -214,4 +214,13 @@ public class MapSourceAction extends SwitchableAction> { getParams().put(KEY_DIALOG, Boolean.toString(((SwitchCompat) root.findViewById(R.id.saveButton)).isChecked())); return super.fillParams(root, activity); } + + @Override + public String getActionText(OsmandApplication application) { + String currentSource = application.getSettings().MAP_ONLINE_DATA.get() + ? application.getSettings().MAP_TILE_SOURCES.get() + : application.getString(R.string.vector_data); + + return application.getString(R.string.map_quick_action_pattern, getTranslatedItemName(application, currentSource)); + } } diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/MapUnderlayAction.java b/OsmAnd/src/net/osmand/plus/rastermaps/MapUnderlayAction.java index ed598a344b..ddb941e10b 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/MapUnderlayAction.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/MapUnderlayAction.java @@ -226,4 +226,12 @@ public class MapUnderlayAction extends SwitchableAction> { getParams().put(KEY_DIALOG, Boolean.toString(((SwitchCompat) root.findViewById(R.id.saveButton)).isChecked())); return super.fillParams(root, activity); } + + @Override + public String getActionText(OsmandApplication application) { + String currentSource = application.getSettings().MAP_UNDERLAY.get() == null ? KEY_NO_UNDERLAY + : application.getSettings().MAP_UNDERLAY.get(); + + return application.getString(R.string.map_quick_action_pattern, getTranslatedItemName(application, currentSource)); + } }