Fix status bar color with quick actions widget

This commit is contained in:
alex 2017-11-06 17:12:44 +02:00
parent b1938b0b39
commit b79f3e2d03
2 changed files with 6 additions and 1 deletions

View file

@ -827,6 +827,10 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
getWindow().setStatusBarColor(ContextCompat.getColor(this, dashboardOnMap.getStatusBarColor()));
return;
}
if (mapLayers.getMapQuickActionLayer().isWidgetVisible()) {
getWindow().setStatusBarColor(ContextCompat.getColor(this, R.color.status_bar_transparent_gradient));
return;
}
boolean night = app.getDaynightHelper().isNightModeForMapControls();
boolean markerTopBar = mapLayers.getMapMarkersLayer().getWidgetsFactory().isTopBarVisible();
int colorId;

View file

@ -181,7 +181,7 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
return result;
}
private boolean isWidgetVisible() {
public boolean isWidgetVisible() {
return quickActionsWidget.getVisibility() == View.VISIBLE;
}
@ -195,6 +195,7 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
updateQuickActionButton(showWidget);
quickActionsWidget.setVisibility(!showWidget ? View.GONE : View.VISIBLE);
mapActivity.updateStatusBarColor();
if (!showWidget) {
quitMovingMarker();