mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2026-04-09 00:00:02 +08:00
CB-6314 - Add StatusBar.isVisible support to Android
This commit is contained in:
committed by
Shazron Abdullah
parent
bdbaf12959
commit
a6a4cf473b
@@ -65,6 +65,11 @@ public class StatusBar extends CordovaPlugin {
|
||||
Log.v(TAG, "Executing action: " + action);
|
||||
final Activity activity = this.cordova.getActivity();
|
||||
final Window window = activity.getWindow();
|
||||
if ("_ready".equals(action)) {
|
||||
boolean statusBarVisible = (window.getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0;
|
||||
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, statusBarVisible));
|
||||
}
|
||||
|
||||
if ("show".equals(action)) {
|
||||
this.cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user