CB-6314 - Add StatusBar.isVisible support to Android

This commit is contained in:
Andrey Kurdyumov
2014-03-19 16:48:59 +06:00
committed by Shazron Abdullah
parent bdbaf12959
commit a6a4cf473b
3 changed files with 11 additions and 6 deletions
+5
View File
@@ -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