For the device which android version is lower than 12.0, you can use the following code to make the image full full the splash screen.
- Delete the old splash image in the Resources/Splash folder.
- Put your image in it and set it's build action as MauiSplashScreen
- Create a xml file in the
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>
<bitmap
android:src="@drawable/splash" //the splash is your image's name
android:dither="true"
android:gravity="fill"/>
</item>
</layer-list>
And then, your image will show in the full splash screen.
For the device which android version is lower than(or =) 12.0, the android system changed the api about the splash screen. The resource code about is the FrameLayout
contains a ImageView
and we can't set the ImageView
layout_width
and layout_height
. For more information, you can check the answer in this link.