fix: status bar being black on Android 13 devices

This commit is contained in:
Rainer Killinger
2022-09-30 10:37:00 +02:00
parent 3316ad9169
commit feee9e8db9
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
@@ -13,10 +13,12 @@
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
<item name="android:background">@null</item> <item name="android:background">@null</item>
<item name="android:windowBackground">#FFFFFF</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
</style> </style>
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen"> <style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="android:background">@drawable/splash</item> <item name="android:background">@drawable/splash</item>
</style> </style>
</resources> </resources>

View File

@@ -100,6 +100,7 @@ export class AppComponent implements AfterContentInit {
.trim(), .trim(),
}); });
await StatusBar.setStyle({style: Style.Dark}); await StatusBar.setStyle({style: Style.Dark});
await StatusBar.setOverlaysWebView({overlay: false});
await NavigationBar.setColor({ await NavigationBar.setColor({
color: getComputedStyle(document.documentElement) color: getComputedStyle(document.documentElement)
.getPropertyValue('--ion-background-color') .getPropertyValue('--ion-background-color')