Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-08-05 00:07:18 +02:00
commit b241ddfad6

View file

@ -78,6 +78,8 @@ public class MapActivityLayers {
private MapControlsLayer mapControlsLayer; private MapControlsLayer mapControlsLayer;
private DownloadedRegionsLayer downloadedRegionsLayer; private DownloadedRegionsLayer downloadedRegionsLayer;
private MapWidgetRegistry mapWidgetRegistry; private MapWidgetRegistry mapWidgetRegistry;
private StateChangedListener<Integer> transparencyListener;
public MapActivityLayers(MapActivity activity) { public MapActivityLayers(MapActivity activity) {
this.activity = activity; this.activity = activity;
@ -150,14 +152,15 @@ public class MapActivityLayers {
mapControlsLayer = new MapControlsLayer(activity); mapControlsLayer = new MapControlsLayer(activity);
mapView.addLayer(mapControlsLayer, 11); mapView.addLayer(mapControlsLayer, 11);
app.getSettings().MAP_TRANSPARENCY.addListener(new StateChangedListener<Integer>() { transparencyListener = new StateChangedListener<Integer>() {
@Override @Override
public void stateChanged(Integer change) { public void stateChanged(Integer change) {
mapTileLayer.setAlpha(change); mapTileLayer.setAlpha(change);
mapVectorLayer.setAlpha(change); mapVectorLayer.setAlpha(change);
mapView.refreshMap(); mapView.refreshMap();
} }
}); };
app.getSettings().MAP_TRANSPARENCY.addListener(transparencyListener);
OsmandPlugin.createLayers(mapView, activity); OsmandPlugin.createLayers(mapView, activity);
app.getAppCustomization().createLayers(mapView, activity); app.getAppCustomization().createLayers(mapView, activity);