Change map quick widget naming style using arrow and three dots

This commit is contained in:
androiddevkotlin 2021-04-01 12:30:38 +03:00
parent 169d734f47
commit bf6d5f0b83
5 changed files with 13 additions and 19 deletions

View file

@ -12,7 +12,7 @@
-->
<string name="ltr_or_rtl_combine_via_plus">%1$s + %2$d</string>
<string name="map_quick_action_pattern">%1$s → …</string>
<string name="update_all_maps_added">Update all maps added to %1$s?</string>
<string name="release_4_0_beta">
• OsmAnd Live updates moved to \"Downloads > Updates\"\n\n

View file

@ -248,10 +248,8 @@ public class MapStyleAction extends SwitchableAction<String> {
@Override
public String getActionText(OsmandApplication application) {
List<String> mapStyles = getFilteredStyles();
int mapCount = mapStyles.size() - 1;
String name = application.getSettings().RENDERER.get();
String currentSource = application.getSettings().RENDERER.get();
return application.getString(R.string.ltr_or_rtl_combine_via_plus, name, mapCount);
return application.getString(R.string.map_quick_action_pattern, currentSource);
}
}

View file

@ -227,10 +227,9 @@ public class MapOverlayAction extends SwitchableAction<Pair<String, String>> {
@Override
public String getActionText(OsmandApplication application) {
List<Pair<String, String>> sources = loadListFromParams();
int mapCount = sources.size() - 1;
String name = application.getSettings().MAP_OVERLAY.get();
String currentSource = application.getSettings().MAP_OVERLAY.get() == null ? KEY_NO_OVERLAY
: application.getSettings().MAP_OVERLAY.get();
return application.getString(R.string.ltr_or_rtl_combine_via_plus, name, mapCount);
return application.getString(R.string.map_quick_action_pattern, currentSource);
}
}

View file

@ -217,12 +217,10 @@ public class MapSourceAction extends SwitchableAction<Pair<String, String>> {
@Override
public String getActionText(OsmandApplication application) {
Pair<String, String> currentSource = application.getSettings().MAP_ONLINE_DATA.get()
? new Pair<>(application.getSettings().MAP_TILE_SOURCES.get(), application.getSettings().MAP_TILE_SOURCES.get())
: new Pair<>(LAYER_OSM_VECTOR, application.getString(R.string.vector_data));
final LinkedHashMap<String, String> entriesMap = new LinkedHashMap<>();
int mapCount = entriesMap.size() - 1;
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.ltr_or_rtl_combine_via_plus, currentSource, mapCount);
return application.getString(R.string.map_quick_action_pattern, currentSource);
}
}

View file

@ -229,10 +229,9 @@ public class MapUnderlayAction extends SwitchableAction<Pair<String, String>> {
@Override
public String getActionText(OsmandApplication application) {
List<Pair<String, String>> sources = loadListFromParams();
int mapCount = sources.size() - 1;
String name = application.getSettings().MAP_UNDERLAY.get();
String currentSource = application.getSettings().MAP_UNDERLAY.get() == null ? KEY_NO_UNDERLAY
: application.getSettings().MAP_UNDERLAY.get();
return application.getString(R.string.ltr_or_rtl_combine_via_plus, name, mapCount);
return application.getString(R.string.map_quick_action_pattern, currentSource);
}
}