Browse Source

Maybe get status bar color right the third time?

tags/v1.3.0
Skylar Ittner 8 months ago
parent
commit
6192c47840
2 changed files with 3 additions and 5 deletions
  1. +1
    -1
      config.xml
  2. +2
    -4
      www/js/platform.js

+ 1
- 1
config.xml View File

@@ -23,7 +23,7 @@
<preference name="android-targetSdkVersion" value="27" />
<allow-intent href="market:*" />
<preference name="HeaderColor" value="#F44336" />
<preference name="StatusBarBackgroundColor" value="#D32F2F" />
<preference name="StatusBarBackgroundColor" value="#E0E0E0" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" />
</edit-config>


+ 2
- 4
www/js/platform.js View File

@@ -45,10 +45,6 @@ function initCordova() {
}, false);

document.addEventListener("deviceready", function () {
if (cordova.platformId == 'android') {
StatusBar.backgroundColorByHexString("#D32F2F");
StatusBar.styleLightContent();
}
}, false);

openBrowser = function (url) {
@@ -60,11 +56,13 @@ function initCordova() {
$("#app").addClass("theme-dark");
if (cordova.platformId == 'android') {
StatusBar.styleBlackOpaque();
StatusBar.backgroundColorByHexString("#000000");
}
} else {
$("#app").removeClass("theme-dark");
if (cordova.platformId == 'android') {
StatusBar.styleDefault();
StatusBar.backgroundColorByHexString("#E0E0E0");
}
}
}


Loading…
Cancel
Save