Use dark statusbar text on home screen

master
Skylar Ittner 5 years ago
parent 181dced5fa
commit c620a16333

@ -65,15 +65,9 @@ var watchLocation = function (success, error) {
function initCordova() { function initCordova() {
platform_type = "cordova"; platform_type = "cordova";
try {
eval('"use strict"; class foo {}');
} catch (e) {
alert("Your device's webview is out of date and won't work with this app. Please update it.");
}
// Handle back button to close things // Handle back button to close things
document.addEventListener("backbutton", function (event) { document.addEventListener("backbutton", function (event) {
router.navigate("/home"); router.back();
}, false); }, false);
document.addEventListener("deviceready", function () { document.addEventListener("deviceready", function () {
@ -83,6 +77,13 @@ function initCordova() {
//StatusBar.backgroundColorByHexString("#324150"); //StatusBar.backgroundColorByHexString("#324150");
//StatusBar.styleLightContent(); //StatusBar.styleLightContent();
} }
router.on("routeChange", function (newRoute, previousRoute, router) {
if (newRoute.name == "home") {
StatusBar.styleDefault();
} else {
StatusBar.styleLightContent();
}
});
}, false); }, false);
openBrowser = function (url) { openBrowser = function (url) {

Loading…
Cancel
Save