cordova 插件状态栏无法在 Android 13 上运行,为什么?

问题描述 投票:0回答:1

我正在使用 cordova-plugin-statusbar 更改状态栏背景颜色和状态栏文本颜色,但它在 Android 13 上不起作用

我添加了 cordova-plugin-statusbar 然后我使用了这段代码



document.addEventListener('deviceready', SetStatusBarColor, false);

function SetStatusBarColor() {

    StatusBar.overlaysWebView(false);

    StatusBar.backgroundColorByHexString("#ffffff");

    // Set the status bar text color to black

    StatusBar.styleDefault();

}

我需要状态栏背景颜色为白色,状态栏文本颜色为黑色,但它在 Android 13 上不起作用。 另一方面,当我重新启动应用程序时,它在安装应用程序后首次适用于 Android 12,状态栏文本颜色未更改为黑色,仅背景颜色更改

javascript android cordova
1个回答
0
投票

我有类似的问题,我的应用程序需要 android 13 而 cordova 没有该版本..

© www.soinside.com 2019 - 2024. All rights reserved.