1

I'm trying to make the background of an android 12 splash screen use @android:color/system_neutral1_900 as the background, but as I can see, the color loads only after the splash screen. Is there any way to use it on the splash screen?

<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
    <!-- Set the splash screen background, animated icon, and animation duration. -->
    <item name="windowSplashScreenBackground">@android:color/system_neutral1_900</item>
</style>

The color does not appear and it uses the default grey. I also tried with other system_ colors and the same result comes up. Using @android:color/black or hex colors works.

Rares
  • 11
  • 4

1 Answers1

0

Try using this item as part of your main application theme according to this link

 <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:windowSplashScreenBackground">@color/colorAccent</item>
</style>
Matin
  • 3
  • 1
  • Hi. My problem wasn't that I cannot theme the splash screen, it was that I can not use the system dynamic colors (monet colors) for theming it. If I set windowSplashScreenBackground to a color like @android:color/black it works. I just want to use dynamic colors, as my app uses it and I don't like the transition from that simple white to the one with a tint. Thank you though for trying to help me. – Rares Jul 24 '22 at 11:12