From 7d9709898d765ba7b2ae62470b45b703a3e2b682 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Fri, 17 Jan 2020 17:52:28 +0200 Subject: [PATCH 1/2] Add renaming icons --- OsmAnd/src/net/osmand/plus/ApplicationMode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/ApplicationMode.java b/OsmAnd/src/net/osmand/plus/ApplicationMode.java index 00d0c0c695..6fdc001d84 100644 --- a/OsmAnd/src/net/osmand/plus/ApplicationMode.java +++ b/OsmAnd/src/net/osmand/plus/ApplicationMode.java @@ -875,7 +875,7 @@ public class ApplicationMode { PICKUP_TRUCK(R.drawable.ic_action_pickup_truck, R.string.app_mode_pickup_truck, "ic_action_pickup_truck"), WAGON(R.drawable.ic_action_wagon, R.string.app_mode_wagon, "ic_action_wagon"), UTV(R.drawable.ic_action_utv, R.string.app_mode_utv, "ic_action_utv"), - OSM(R.drawable.ic_action_osmand_logo, R.string.app_mode_osm, "ic_action_osmand_logo"); + OSM(R.drawable.map_action_openstreetmap_logo, R.string.app_mode_osm, "map_action_openstreetmap_logo"); @DrawableRes private int resId; From 8a8dce2c805bb1dd94c34371a3004129a9bde602 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Mon, 20 Jan 2020 11:52:50 +0200 Subject: [PATCH 2/2] Fix default icons issue --- OsmAnd/src/net/osmand/plus/ApplicationMode.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/ApplicationMode.java b/OsmAnd/src/net/osmand/plus/ApplicationMode.java index 6fdc001d84..31621293c0 100644 --- a/OsmAnd/src/net/osmand/plus/ApplicationMode.java +++ b/OsmAnd/src/net/osmand/plus/ApplicationMode.java @@ -148,9 +148,9 @@ public class ApplicationMode { @Expose RouteService routeService = RouteService.OSMAND; @Expose - LocationIcon locationIcon = LocationIcon.DEFAULT; + LocationIcon locationIcon = null; @Expose - NavigationIcon navigationIcon = NavigationIcon.DEFAULT; + NavigationIcon navigationIcon = null; @Expose int order; } @@ -675,8 +675,12 @@ public class ApplicationMode { applicationMode.iconColor = modeBean.iconColor; applicationMode.routingProfile = modeBean.routingProfile; applicationMode.routeService = modeBean.routeService; - applicationMode.locationIcon = modeBean.locationIcon; - applicationMode.navigationIcon = modeBean.navigationIcon; + if (modeBean.locationIcon != null) { + applicationMode.locationIcon = modeBean.locationIcon; + } + if (modeBean.navigationIcon != null) { + applicationMode.navigationIcon = modeBean.navigationIcon; + } applicationMode.order = modeBean.order; } } @@ -875,7 +879,7 @@ public class ApplicationMode { PICKUP_TRUCK(R.drawable.ic_action_pickup_truck, R.string.app_mode_pickup_truck, "ic_action_pickup_truck"), WAGON(R.drawable.ic_action_wagon, R.string.app_mode_wagon, "ic_action_wagon"), UTV(R.drawable.ic_action_utv, R.string.app_mode_utv, "ic_action_utv"), - OSM(R.drawable.map_action_openstreetmap_logo, R.string.app_mode_osm, "map_action_openstreetmap_logo"); + OSM(R.drawable.ic_action_openstreetmap_logo, R.string.app_mode_osm, "ic_action_openstreetmap_logo"); @DrawableRes private int resId;