I tried the approach with .Net 7 on MAUI to support light and dark mode for splash screen with following steps but it doesn't seem to work as per following:
The "@color/colorPrimaryDark" for "styles.xml" in both "values" and "values-night" takes the value #1B3147 for bacground color of splash screen and not what I have mentioned in "colors.xml".
Indeed, I've tried that and if I remember correctly, the background was completely black then, but in both configurations. Not quite sure anymore, though.
Hi Julian Ewers-Peters,
I tried the approach with .Net 7 on MAUI to support light and dark mode for splash screen with following steps but it doesn't seem to work as per following:
<MauiSplashScreen Include="Resources\Splash\splash.svg"/>
The "@color/colorPrimaryDark" for "styles.xml" in both "values" and "values-night" takes the value #1B3147 for bacground color of splash screen and not what I have mentioned in "colors.xml".
Here is the configuration of "MainActivity.cs":
[Activity(Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.KeyboardHidden, ScreenOrientation = ScreenOrientation.Portrait)]
So, please let me know what I am missing on my side to make it work. Awaiting you reply.