Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9a8bd601c5
2 changed files with 11 additions and 2 deletions
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue