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

   Alright to start off, I'm testing using the API 29 emulator.
   
   The image works with a simple cordova project (specifying just the icon and 
autohide false so I can screen capture easily)
   
   <details>
   <summary>Screen Capture</summary>
   
   ![Screenshot from 2023-03-14 
17-13-00](https://user-images.githubusercontent.com/11200662/225125684-f21921d2-99ad-49c4-bc21-fbf624b956ed.png)
   
   </details>
   
   So I then started to add more of your custom configuration. I'm not sure 
which custom configuration plugin in you're using, I tried 
[cordova-custom-config](https://www.npmjs.com/package/cordova-custom-config) 
but for some reason it doesn't appear to be working and it's not overwriting 
the `AndroidManifest.xml` which I suspect it should be.
   
   So I applied the changes manually, starting with the most interesting 
override:
   
   ```xml
   <activity ... android:theme="@style/Theme.AppCompat.NoActionBar">
   ```
   
   This is overriding the default theme, which for splashscreen compatibility 
layer, it needs to be kept as `@style/Theme.App.SplashScreen`
   
   If you want to change the theme for the app, you can use the 
`AndroidPostSplashScreenTheme` preference which cordova will read and set the 
theme after the splashscreen is dismissed.
   
   So scratch out `android:theme="@style/Theme.AppCompat.NoActionBar"` from 
your `<custom-config-file>` entry and add `<preference 
name="AndroidPostSplashScreenTheme" value="@style/Theme.AppCompat.NoActionBar" 
/>` and let me know if this does what you want in your real app.
   
   I think most people having this problem is probably related to a plugin or 
something overriding the default theme, which to my understanding, **Must** be 
the splashscreen theme for [Google's compatibility 
library](https://developer.android.com/reference/kotlin/androidx/core/splashscreen/SplashScreen)
 to work. Due to volume of people raising similar issues, it will be worth 
documenting the error and the solution under the 
[Quirks](https://cordova.apache.org/docs/en/11.x/core/features/splashscreen/index.html#quirks-&-known-issues)
 section and I'll create a separate issue in our docs repo for this.


-- 
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