Skip to content

Add better support for Android 12+ Splash Screen APIs #9794

@mattleibow

Description

@mattleibow

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions