Fix transparency
This commit is contained in:
parent
f5dd121328
commit
640c3aa5e6
1 changed files with 5 additions and 2 deletions
|
@ -79,6 +79,8 @@ public class MapActivityLayers {
|
|||
private DownloadedRegionsLayer downloadedRegionsLayer;
|
||||
private MapWidgetRegistry mapWidgetRegistry;
|
||||
|
||||
private StateChangedListener<Integer> transparencyListener;
|
||||
|
||||
public MapActivityLayers(MapActivity activity) {
|
||||
this.activity = activity;
|
||||
this.mapWidgetRegistry = new MapWidgetRegistry(activity.getMyApplication().getSettings());
|
||||
|
@ -150,14 +152,15 @@ public class MapActivityLayers {
|
|||
mapControlsLayer = new MapControlsLayer(activity);
|
||||
mapView.addLayer(mapControlsLayer, 11);
|
||||
|
||||
app.getSettings().MAP_TRANSPARENCY.addListener(new StateChangedListener<Integer>() {
|
||||
transparencyListener = new StateChangedListener<Integer>() {
|
||||
@Override
|
||||
public void stateChanged(Integer change) {
|
||||
mapTileLayer.setAlpha(change);
|
||||
mapVectorLayer.setAlpha(change);
|
||||
mapView.refreshMap();
|
||||
}
|
||||
});
|
||||
};
|
||||
app.getSettings().MAP_TRANSPARENCY.addListener(transparencyListener);
|
||||
|
||||
OsmandPlugin.createLayers(mapView, activity);
|
||||
app.getAppCustomization().createLayers(mapView, activity);
|
||||
|
|
Loading…
Reference in a new issue