Commit 0da97848 authored by 李晓兵's avatar 李晓兵

'statusBar'

parent 896492d4
...@@ -54,17 +54,22 @@ public class StatusBar extends CordovaPlugin { ...@@ -54,17 +54,22 @@ public class StatusBar extends CordovaPlugin {
this.cordova.getActivity().runOnUiThread(new Runnable() { this.cordova.getActivity().runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
// Clear flag FLAG_FORCE_NOT_FULLSCREEN which is set initially // Clear flag FLAG_FORCE_NOT_FULLSCREEN which is set initially
// by the Cordova. // by the Cordova.
Window window = cordova.getActivity().getWindow(); Window window = cordova.getActivity().getWindow();
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
// Read 'StatusBarBackgroundColor' from config.xml, default is #000000. // window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#000000")); // window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
window.setStatusBarColor(Color.WHITE);
window.setNavigationBarColor(Color.WHITE);
//window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
// Read 'StatusBarStyle' from config.xml, default is 'lightcontent'. // Read 'StatusBarBackgroundColor' from config.xml, default is #000000.
setStatusBarStyle(preferences.getString("StatusBarStyle", "lightcontent")); setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#FFFFFF"));
}
// Read 'StatusBarStyle' from config.xml, default is 'lightcontent'.
setStatusBarStyle(preferences.getString("StatusBarStyle", "lightcontent"));
}
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment