From d6281cff27d42ee84f88da51727c2799d3fb34b3 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 1 Nov 2016 22:11:02 +0300 Subject: [PATCH] Fix #3208 --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 3 +++ OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 4bacaf0366..f9c8d6532f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -985,6 +985,9 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } }); getMapView().refreshMap(true); + if (mapLayers.getMapControlsLayer() != null) { + mapLayers.getMapControlsLayer().updateAppModeIcon(app.getDaynightHelper().isNightMode()); + } } public void updateMapSettings() { diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index e6288212aa..207dc2b8fd 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -235,8 +235,8 @@ public class MapControlsLayer extends OsmandMapLayer { private void initTopControls() { View configureMap = mapActivity.findViewById(R.id.map_layers_button); - layersHud = createHudButton(configureMap, R.drawable.map_layer_dark) - .setIconsId(R.drawable.map_layer_dark, R.drawable.map_layer_night) + layersHud = createHudButton(configureMap, R.drawable.ic_world_globe_dark) + .setIconColorId(R.color.on_map_icon_color, 0) .setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night); controls.add(layersHud); configureMap.setOnClickListener(new View.OnClickListener() { @@ -675,6 +675,12 @@ public class MapControlsLayer extends OsmandMapLayer { } } + public void updateAppModeIcon(boolean isNight) { + appModeIcon.setImageDrawable(app.getIconsCache().getIcon( + settings.getApplicationMode().getSmallIconDark(), + isNight ? 0 : R.color.on_map_icon_color)); + } + public void updateCompass(boolean isNight) { float mapRotate = mapActivity.getMapView().getRotate(); boolean showCompass = shouldShowCompass();