Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-11-01 20:11:32 +01:00
commit 9a8bd601c5
2 changed files with 11 additions and 2 deletions

View file

@ -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() {

View file

@ -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();