Description
As part of Android's ongoing improvements and changes to splash screens, Android 12+ has additional image requirements:
The first issue was that images were not showing at all because of new things, but that was fixed in #8394
However, those changes also missed the image size requirements. As of now, the image is still the large sizes from the source image which results in it being clipped. This issue is to track any work to automatically fit the screen.
Workaround
Add a file into your .NET MAUI app with this exact name:
Platforms\Android\Resources\drawable\maui_splash.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<item android:drawable="@color/maui_splash_color" />
<item
android:width="108dp"
android:height="108dp"
android:gravity="center">
<bitmap
android:gravity="fill"
android:src="@drawable/name_of_your_splash_image"
android:mipMap="true"/>
</item>
</layer-list>
Make sure to use the name of your splash screen image in the place of name_of_your_splash_image
Related:
Description
As part of Android's ongoing improvements and changes to splash screens, Android 12+ has additional image requirements:
The first issue was that images were not showing at all because of new things, but that was fixed in #8394
However, those changes also missed the image size requirements. As of now, the image is still the large sizes from the source image which results in it being clipped. This issue is to track any work to automatically fit the screen.
Workaround
Add a file into your .NET MAUI app with this exact name:
Platforms\Android\Resources\drawable\maui_splash.xmlRelated:
and was fixed in this PR [android] fix MauiSplashScreen on Android 12+ #8394