CB-11197 Keep status bar hidden when keyboard pops up

This closes #59
This commit is contained in:
Vladimir Kotikov 2016-05-23 14:42:22 +03:00
parent c34e3a02c2
commit cfce729912

View File

@ -96,9 +96,10 @@ public class StatusBar extends CordovaPlugin {
uiOptions &= ~View.SYSTEM_UI_FLAG_FULLSCREEN; uiOptions &= ~View.SYSTEM_UI_FLAG_FULLSCREEN;
window.getDecorView().setSystemUiVisibility(uiOptions); window.getDecorView().setSystemUiVisibility(uiOptions);
return;
} }
// CB-11197 We still need to update LayoutParams to force status bar
// to be hidden when entering e.g. text fields
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
} }
}); });
@ -117,9 +118,10 @@ public class StatusBar extends CordovaPlugin {
| View.SYSTEM_UI_FLAG_FULLSCREEN; | View.SYSTEM_UI_FLAG_FULLSCREEN;
window.getDecorView().setSystemUiVisibility(uiOptions); window.getDecorView().setSystemUiVisibility(uiOptions);
return;
} }
// CB-11197 We still need to update LayoutParams to force status bar
// to be hidden when entering e.g. text fields
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
} }
}); });