Splash Screen in MG3.8.1 /Android

Hi, Has anyone managed to configure the splash on android MG 3.8.1?
before configuration passed by Resource.Designer.cs but in MG 3.8.1 no longer exists
Thanks in advance ?

Hi @Guess_Game , I did it like this:

In Activity1.cs, in the [Activity] attribut, I set the property

Theme = "@style/Theme.Splash",

I added in the Resources/Values folder this Styles.xml

<?xml version="1.0" encoding="utf-8"?>
  <style name="Theme.Splash" parent="android:Theme">
    <item name="android:windowBackground">@drawable/splash</item>
    <item name="android:windowNoTitle">true</item>   

And the last step, added Splash.png in the Resources/Drawable folder.

I can see the splashscreen in debug mode on emulator, but when I try to debug it via my old Samsung SM-G930W8, I don’t see it … maybe my device is too old … I don’t know.

If you know a better way to implement it, feel free to share with us !

1 Like

thank you for your reply :grinning:

I used it for the old versions it worked well but from API 31 it no longer works

I did a test with using maui for the moment I can change the background color at startup but I can’t display the image

here is how I did it:

Splash screen with maui

Add maui in .csproj

Add MauiSplashScreen in .csproj
<MauiSplashScreen Include="Resources\Drawable\splash.png" Color="#512BD4" BaseSize="128,128" />
<style name="SplashTheme" parent="@style/Maui.SplashTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowActionBar">true</item>

Theme = "@style/Maui.SplashTheme",