Merge pull request #4731 from osmandapp/fix_status_bar

Fix status bar
This commit is contained in:
Alexey 2017-11-10 18:59:22 +03:00 committed by GitHub
commit be227ee554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View file

@ -132,7 +132,7 @@
<color name="status_bar_light">#e58200</color>
<color name="status_bar_dark">#2f3a40</color>
<color name="status_bar_transparent_light">#33000000</color>
<color name="status_bar_transparent_light">#66000000</color>
<color name="status_bar_transparent_dark">#99000000</color>
<color name="status_bar_transparent_gradient">#CC000000</color>
<color name="status_bar_mapillary">#11ab51</color>

View file

@ -832,12 +832,13 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
getWindow().setStatusBarColor(ContextCompat.getColor(this, colorId));
return;
}
boolean mapControlsVisible = findViewById(R.id.MapHudButtonsOverlay).getVisibility() == View.VISIBLE;
boolean night = app.getDaynightHelper().isNightModeForMapControls();
boolean mapTopBar = findViewById(R.id.map_top_bar).getVisibility() == View.VISIBLE;
boolean markerTopBar = findViewById(R.id.map_markers_top_bar).getVisibility() == View.VISIBLE;
if (mapTopBar) {
if (mapTopBar && mapControlsVisible) {
colorId = night ? R.color.status_bar_route_dark : R.color.status_bar_route_light;
} else if (markerTopBar) {
} else if (markerTopBar && mapControlsVisible) {
colorId = R.color.status_bar_dark;
} else {
colorId = night ? R.color.status_bar_transparent_dark : R.color.status_bar_transparent_light;

View file

@ -35,6 +35,9 @@ public class TrackDetailsMenuFragment extends BaseOsmAndFragment {
menu = mapActivity.getMapLayers().getMapControlsLayer().getTrackDetailsMenu();
View view = inflater.inflate(R.layout.track_details, container, false);
if (!AndroidUiHelper.isOrientationPortrait(getActivity())) {
AndroidUtils.addStatusBarPadding21v(getActivity(), view);
}
if (menu == null || menu.getGpxItem() == null) {
return view;
}

View file

@ -689,6 +689,7 @@ public class MapControlsLayer extends OsmandMapLayer {
} else {
showMapControls();
}
mapActivity.updateStatusBarColor();
}
public void startNavigation() {