Fix/workaround missing statusbar on Android 8.0 (close #22)
This commit is contained in:
parent
b0fe39e4e8
commit
db591ea3a7
@ -12,6 +12,7 @@
|
||||
"dependencies": {
|
||||
"cordova-browser": "^6.0.0",
|
||||
"cordova-plugin-app-version": "^0.1.9",
|
||||
"cordova-plugin-device": "^2.0.2",
|
||||
"cordova-plugin-geolocation": "^4.0.1",
|
||||
"cordova-plugin-headercolor": "^1.0.0",
|
||||
"cordova-plugin-inappbrowser": "^3.0.0",
|
||||
@ -33,7 +34,8 @@
|
||||
"cordova-plugin-inappbrowser": {},
|
||||
"cordova-plugin-transparent-status-bar": {},
|
||||
"cordova-plugin-geolocation": {},
|
||||
"cordova-plugin-splashscreen": {}
|
||||
"cordova-plugin-splashscreen": {},
|
||||
"cordova-plugin-device": {}
|
||||
},
|
||||
"platforms": [
|
||||
"android",
|
||||
|
@ -2553,7 +2553,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-----
|
||||
|
||||
The following software may be included in this product: cordova-plugin-geolocation, cordova-plugin-inappbrowser, cordova-plugin-splashscreen, cordova-plugin-statusbar, cordova-plugin-whitelist. A copy of the source code may be downloaded from https://github.com/apache/cordova-plugin-geolocation (cordova-plugin-geolocation), https://github.com/apache/cordova-plugin-inappbrowser (cordova-plugin-inappbrowser), https://github.com/apache/cordova-plugin-splashscreen (cordova-plugin-splashscreen), https://github.com/apache/cordova-plugin-statusbar (cordova-plugin-statusbar), https://github.com/apache/cordova-plugin-whitelist (cordova-plugin-whitelist). This software contains the following license and notice below:
|
||||
The following software may be included in this product: cordova-plugin-device, cordova-plugin-geolocation, cordova-plugin-inappbrowser, cordova-plugin-splashscreen, cordova-plugin-statusbar, cordova-plugin-whitelist. A copy of the source code may be downloaded from https://github.com/apache/cordova-plugin-device (cordova-plugin-device), https://github.com/apache/cordova-plugin-geolocation (cordova-plugin-geolocation), https://github.com/apache/cordova-plugin-inappbrowser (cordova-plugin-inappbrowser), https://github.com/apache/cordova-plugin-splashscreen (cordova-plugin-splashscreen), https://github.com/apache/cordova-plugin-statusbar (cordova-plugin-statusbar), https://github.com/apache/cordova-plugin-whitelist (cordova-plugin-whitelist). This software contains the following license and notice below:
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
|
@ -113,6 +113,15 @@ function initCordova() {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// When running on Android 8.0 (not 7.1.1, not 8.1, just 8.0), the statusbar
|
||||
// height is incorrectly set to 0px, causing the clock and icons to overlap
|
||||
// on the TerranQuest UI.
|
||||
document.addEventListener("deviceready", function () {
|
||||
if (device.platform == "Android" && device.version == "8.0.0" && getComputedStyle(document.documentElement).getPropertyValue('--f7-statusbar-height') == "0px") {
|
||||
document.documentElement.style.setProperty('--f7-statusbar-height', '24px');
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
function initNW() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user