@@ -378,10 +378,24 @@ function updateProjectSplashScreen (platformConfig, locations) {
378
378
const themes = xmlHelpers . parseElementtreeSync ( locations . themes ) ;
379
379
const splashScreenTheme = themes . find ( 'style[@name="Theme.App.SplashScreen"]' ) ;
380
380
381
+ let splashBg = platformConfig . getPreference ( 'AndroidWindowSplashScreenBackground' , this . platform ) ;
382
+ if ( ! splashBg ) {
383
+ splashBg = platformConfig . getPreference ( 'SplashScreenBackgroundColor' , this . platform ) ;
384
+ }
385
+ if ( ! splashBg ) {
386
+ splashBg = platformConfig . getPreference ( 'BackgroundColor' , this . platform ) ;
387
+ }
388
+
389
+ // use the user defined value for "colors.xml"
390
+ updateProjectSplashScreenBackgroundColor ( splashBg , locations ) ;
391
+
392
+ // force the themes value to `@color/cdv_splashscreen_background`
393
+ const splashBgNode = splashScreenTheme . find ( 'item[@name="windowSplashScreenBackground"]' ) ;
394
+ splashBgNode . text = '@color/cdv_splashscreen_background' ;
395
+
381
396
[
382
397
'windowSplashScreenAnimatedIcon' ,
383
398
'windowSplashScreenAnimationDuration' ,
384
- 'windowSplashScreenBackground' ,
385
399
'android:windowSplashScreenBrandingImage' ,
386
400
'windowSplashScreenIconBackgroundColor' ,
387
401
'postSplashScreenTheme'
@@ -392,14 +406,6 @@ function updateProjectSplashScreen (platformConfig, locations) {
392
406
let themeTargetNode = splashScreenTheme . find ( `item[@name="${ themeKey } "]` ) ;
393
407
394
408
switch ( themeKey ) {
395
- case 'windowSplashScreenBackground' :
396
- // use the user defined value for "colors.xml"
397
- updateProjectSplashScreenBackgroundColor ( cdvConfigPrefValue , locations ) ;
398
-
399
- // force the themes value to `@color/cdv_splashscreen_background`
400
- themeTargetNode . text = '@color/cdv_splashscreen_background' ;
401
- break ;
402
-
403
409
case 'windowSplashScreenAnimatedIcon' :
404
410
// handle here the cases of "png" vs "xml" (drawable)
405
411
// If "png":
0 commit comments