-
Add a
style
in thecolors.xml
file.1 2 3 4 5 6 7 8 9 10
<resources> <color name="colorPrimary">#512BD4</color> <color name="colorPrimaryDark">#2B0B98</color> <color name="colorAccent">#2B0B98</color> <style name="SplashTheme" parent="@style/Maui.SplashTheme"> <item name="android:statusBarColor">@android:color/black</item> <item name="android:navigationBarColor">@android:color/black</item> </style> </resources>
-
Modify the theme in the
MainActivity.cs
file (Platforms/Android).1 2 3 4 5
[Activity( //Theme = "@style/Maui.SplashTheme", Theme = "@style/SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)] public class MainActivity : MauiAppCompatActivity