My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Julian Ewers-Peters

4 likes

·

15.5K reads

4 comments

Victor Hugo Garcia Hernandez
Victor Hugo Garcia Hernandez
Nov 10, 2022

Thanks Julian for sharing this article. I find it really useful!

For the transparent background of the image in the <MauiSplashScreen> have you tried? #00FFFFFF

It is just curiosity if the ALPHA HEX works :)

1
·
·1 reply
Julian Ewers-Peters
Julian Ewers-Peters
Author
·Nov 10, 2022

I'm happy that you find it useful ☺️

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.

·
Hugo Cruz
Hugo Cruz
Aug 27, 2023

Thanks! It works perfectly! Do you already have a tutorial for iOS?

·
Muffadal Khopoliwala
Muffadal Khopoliwala
Sep 27, 2023

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:

  1. I have set the splash screen as below:

<MauiSplashScreen Include="Resources\Splash\splash.svg"/>

  1. 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".

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

·