breautek commented on issue #1501:
URL: 
https://github.com/apache/cordova-android/issues/1501#issuecomment-1521047626

   > The key here seems to be the `postSplashScreenTheme` as very loosely 
documented by Android: 
https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreen.
 This feature is supported by the splashscreen behaviour in `cordova-android` 
core: #1441
   > 
   > With Android 12+, this theme doesn't apply until the splash screen is 
fully hidden, and when it _does_ apply it will clobber any settings configured 
by the Statusbar plugin while the splash was displayed.
   > 
   > In my case, I've added a `styles.xml` file with the configuration my app 
was setting Statusbar to, and this resolved the issue.
   > 
   > ```
   > <?xml version="1.0" encoding="utf-8"?>
   > <resources>
   >   <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
   >     <item name="android:windowBackground">@color/windowBackground</item>
   >     <item name="android:statusBarColor">@android:color/white</item>
   >     <item name="android:windowLightStatusBar">true</item>
   >   </style>
   > </resources>
   > ```
   > 
   > Added to the `config.xml` like this:
   > 
   > ```
   > <widget ...>
   >   <platform name="android">
   >     <preference name="AndroidPostSplashScreenTheme" 
value="@style/AppTheme" />
   >     <resource-file src="res/android/styles.xml" 
target="app/src/main/res/values/styles.xml" />
   >   </platform>
   > </widget>
   > ```
   
   I wonder if we can extend the splashscreen theme so that we can set the 
statusbar stuff like `<item name="android:windowLightStatusBar">true</item>` in 
addition to having the same statusbar config in our post theme.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to