Fix #3208
This commit is contained in:
parent
849581e003
commit
d6281cff27
2 changed files with 11 additions and 2 deletions
|
@ -985,6 +985,9 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getMapView().refreshMap(true);
|
getMapView().refreshMap(true);
|
||||||
|
if (mapLayers.getMapControlsLayer() != null) {
|
||||||
|
mapLayers.getMapControlsLayer().updateAppModeIcon(app.getDaynightHelper().isNightMode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateMapSettings() {
|
public void updateMapSettings() {
|
||||||
|
|
|
@ -235,8 +235,8 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
private void initTopControls() {
|
private void initTopControls() {
|
||||||
View configureMap = mapActivity.findViewById(R.id.map_layers_button);
|
View configureMap = mapActivity.findViewById(R.id.map_layers_button);
|
||||||
layersHud = createHudButton(configureMap, R.drawable.map_layer_dark)
|
layersHud = createHudButton(configureMap, R.drawable.ic_world_globe_dark)
|
||||||
.setIconsId(R.drawable.map_layer_dark, R.drawable.map_layer_night)
|
.setIconColorId(R.color.on_map_icon_color, 0)
|
||||||
.setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
|
.setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
|
||||||
controls.add(layersHud);
|
controls.add(layersHud);
|
||||||
configureMap.setOnClickListener(new View.OnClickListener() {
|
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) {
|
public void updateCompass(boolean isNight) {
|
||||||
float mapRotate = mapActivity.getMapView().getRotate();
|
float mapRotate = mapActivity.getMapView().getRotate();
|
||||||
boolean showCompass = shouldShowCompass();
|
boolean showCompass = shouldShowCompass();
|
||||||
|
|
Loading…
Reference in a new issue