0

I'm a Cordova user and not an Android expert! I've seen answers to this question that presume a lot of Android knowledge and changing Java code.

I'm trying to control the new splash screen introduced in Android 12. I want to change the default background to white. Better yet would be to replace this new splash screen with a static image of my own.

I've updated the compile sdk to 31 and added core-splashscreen:1.0.0-alpha02. That removed my logo from the splash screen which is great. Now I want to change the background color. I've tried styles and themes files without success.

I'm sure there are lots of Cordova users that are struggling with this. Any help would be great!

Thanks much, Jon

Jon Schlossberg
  • 329
  • 2
  • 11
  • Made more headway with this on a different topic https://stackoverflow.com/questions/73385204/cordova-11-splash-screen-what-goes-in-splashscreen-xml – bengrah Sep 09 '22 at 14:30
  • Does this answer your question? [Ionic cordova splash screen](https://stackoverflow.com/questions/74018675/ionic-cordova-splash-screen) – Ikenitenine Dec 16 '22 at 07:33

1 Answers1

0

There are a couple of properties you can add to config.xml that will allow you to control the colour of the splash screen.

    <platform name="android">
        ...
        <preference name="AndroidWindowSplashScreenBackground" value="#FFFFFF" />
        <preference name="AndroidWindowSplashScreenIconBackgroundColor" value="#FFFFFF" />
        ...
    </platform>

More information about it can be found on the Cordova Blog and the Cordova Docs for the Splash Screen

bengrah
  • 477
  • 1
  • 4
  • 17