diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 836eb24ef8..1905c224db 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,14 @@ Thx - Hardy --> + Travel + Emergency + Sport + Symbols + Service + Transport + Special + Amenity Gap %1$s — %2$s Wait for the route recalculation.\nGraph will be available after recalculation. diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsBaseActivity.java new file mode 100644 index 0000000000..e69de29bb2 diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java index c487b7acc6..474c0e7870 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragmentNew.java @@ -47,6 +47,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.activities.SettingsBaseActivity; import net.osmand.plus.base.BaseOsmAndFragment; import net.osmand.plus.helpers.AndroidUiHelper; import net.osmand.plus.helpers.ColorDialogs; @@ -567,23 +568,6 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment { : R.color.inactive_buttons_and_links_bg_light))); } - private void createIconSelector() { - iconCategories = new LinkedHashMap<>(); - try { - JSONObject obj = new JSONObject(loadJSONFromAsset()); - JSONObject categories = obj.getJSONObject("categories"); - for (int i = 0; i < categories.length(); i++) { - JSONArray names = categories.names(); - JSONObject icons = categories.getJSONObject(names.get(i).toString()); - iconCategories.put(names.get(i).toString(), icons.getJSONArray("icons")); - } - } catch (JSONException e) { - e.printStackTrace(); - } - selectedIconCategory = getInitCategory(); - createIconForCategory(); - } - private String getInitCategory() { for (int j = 0; j < iconCategories.values().size(); j++) { JSONArray iconJsonArray = (JSONArray) iconCategories.values().toArray()[j]; @@ -604,6 +588,25 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment { return app.getResources().getResourceEntryName(iconId).replaceFirst("mx_", ""); } + private void createIconSelector() { + iconCategories = new LinkedHashMap<>(); + try { + JSONObject obj = new JSONObject(loadJSONFromAsset()); + JSONObject categories = obj.getJSONObject("categories"); + for (int i = 0; i < categories.length(); i++) { + JSONArray names = categories.names(); + JSONObject icons = categories.getJSONObject(names.get(i).toString()); + String name = names.get(i).toString(); + String translatedName = SettingsBaseActivity.getIconStringPropertyName(app, name, name); + iconCategories.put(translatedName, icons.getJSONArray("icons")); + } + } catch (JSONException e) { + e.printStackTrace(); + } + selectedIconCategory = getInitCategory(); + createIconForCategory(); + } + private void createIconForCategory() { FlowLayout selectIcon = view.findViewById(R.id.select_icon); selectIcon.removeAllViews();