1. <tbody id="y0n05"><nobr id="y0n05"><input id="y0n05"></input></nobr></tbody><strong id="y0n05"><acronym id="y0n05"></acronym></strong>

          1. Cordova插件使用——Statusbar定制狀態欄

            小編:管理員 543閱讀 2022.09.13

            全稱是:cordova-plugin-statusbar

            什么時候用它呢?比如下面的場景:

            image.png

            因為應用標題欄背景有底色,而默認狀態欄的文字顏色為黑色,看上去就沒那么美觀,所以我們可以去利用該插件改變狀態欄的文字為協調的顏色。

            那實際在ionic3里是怎么使用的?

            因為該插件是項目默認安裝的,所以我們直接使用即可,打開app.component.ts,找到下面代碼

            this.platform.ready().then(() => {
                  // Okay, so the platform is ready and our plugins are available.
                  // Here you can do any higher level native things you might need.
                  this.statusBar.styleDefault();
                  this.splashScreen.hide();
                });
            復制

            把this.statusBar.styleDefault()改為this.statusBar.styleLightContent()即可,這是其中一種方式,還有其它方式,可以查看文檔: https://github.com/apache/cordova-plugin-statusbar 其中列出其余方法如下:

            StatusBar.overlaysWebView
            StatusBar.styleDefault
            StatusBar.styleLightContent
            StatusBar.styleBlackTranslucent
            StatusBar.styleBlackOpaque
            StatusBar.backgroundColorByName
            StatusBar.backgroundColorByHexString
            StatusBar.hide
            StatusBar.show
            復制
            關聯標簽:
            国产欧美日韩激情视频一区,久久无码中文字幕无码网站,99久久久成人毛片无码,国产国语脏话对白免费视频,丰满熟女大屁股水多多