mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-18 17:02:49 +08:00
Don't overwrite the whole SystemUiVisibility in setStatusBarTransparent
Fixes #275
This commit is contained in:
parent
5492147ab7
commit
66cc74f1bc
@ -185,9 +185,10 @@ public class StatusBar extends CordovaPlugin {
|
||||
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user