diff --git a/src/android/StatusBar.java b/src/android/StatusBar.java index b350fa4f..ea151190 100644 --- a/src/android/StatusBar.java +++ b/src/android/StatusBar.java @@ -185,9 +185,10 @@ private void setStatusBarBackgroundColor(final String colorPref) { private void setStatusBarTransparent(final boolean isTransparent) { final Window window = cordova.getActivity().getWindow(); + int uiOptions = window.getDecorView().getSystemUiVisibility(); int visibility = isTransparent - ? View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN - : View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_VISIBLE; + ? uiOptions | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + : uiOptions | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_VISIBLE; window.getDecorView().setSystemUiVisibility(visibility);