StatusBar.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:siiMobilityAppKit 作者:
/**
 * Sets the context of the Command. This can then be used to do things like
 * get file paths associated with the Activity.
 *
 * @param cordova The context of the main Activity.
 * @param webView The CordovaWebView Cordova is running in.
 */
@Override
public void initialize(final CordovaInterface cordova, CordovaWebView webView) {
    LOG.v(TAG, "StatusBar: initialization");
    super.initialize(cordova, webView);

    this.cordova.getActivity().runOnUiThread(new Runnable() {
        @Override
        public void run() {
            // Clear flag FLAG_FORCE_NOT_FULLSCREEN which is set initially
            // by the Cordova.
            Window window = cordova.getActivity().getWindow();
            window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);

            // Read 'StatusBarBackgroundColor' from config.xml, default is #000000.
            setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#000000"));

            // Read 'StatusBarStyle' from config.xml, default is 'lightcontent'.
            setStatusBarStyle(preferences.getString("StatusBarStyle", "lightcontent"));
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号