Change status bar color for dashboard and plan route

This commit is contained in:
Alexander Sytnyk 2017-11-03 14:17:18 +02:00
parent 31fb444638
commit b229ab0e06
3 changed files with 8 additions and 1 deletions

View file

@ -134,6 +134,7 @@
<color name="status_bar_dark">#2f3a40</color>
<color name="status_bar_transparent_light">#33000000</color>
<color name="status_bar_transparent_dark">#99000000</color>
<color name="status_bar_transparent_gradient">#CC000000</color>
<color name="status_bar_mapillary">#11ab51</color>
<color name="status_bar_route_light">#d9d9d9</color>

View file

@ -866,6 +866,9 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
updateLocation(true, true, false);
// addOrUpdateDashboardFragments();
mapActivity.getRoutingHelper().addListener(this);
if (Build.VERSION.SDK_INT >= 21) {
mapActivity.getWindow().setStatusBarColor(ContextCompat.getColor(mapActivity, R.color.status_bar_transparent_gradient));
}
} else {
mapActivity.getMapViewTrackingUtilities().setDashboard(null);
hide(dashboardView.findViewById(R.id.animateContent), animation);
@ -890,6 +893,9 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
fragment.show(mapActivity.getSupportFragmentManager(), MapillaryFirstDialogFragment.TAG);
settings.MAPILLARY_FIRST_DIALOG_SHOWN.set(true);
}
if (Build.VERSION.SDK_INT >= 21) {
mapActivity.updateStatusBarColor();
}
}
}

View file

@ -392,7 +392,7 @@ public class PlanRouteFragment extends ColoredStatusBarFragment implements OsmAn
if (fullScreen) {
return nightMode ? R.color.status_bar_dark : R.color.status_bar_route_light;
}
return -1;
return R.color.status_bar_transparent_gradient;
}
@Override