MAUI: How to add splash screen in android platform
I am trying to add splash screen on my new MAUI application. I tried the implementation on this blog but the image is in circle (Android 12 device) and only showing black and white color on the icon. Is there anyway to show the real color of the icon on the splash screen?
As per this thread, there are certain rules for the splash icon in MAUI. But I need the entire icon (my icon is in rectangle) in my UI with its real color. So I am trying the platform specific approach.
As per the Platform-specific configuration on this blog I have created values
and drawable
folders under Resources
folder and added maui_colors.xml
and maui_splash_image.xml
.
I have added the splashscreen code like below:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
android:gravity="fill_horizontal|fill_vertical"
android:src="@drawable/ic_splash_xx"/>
</item>
</layer-list>
But after this also the MAUI SVG splash is showing on the UI. Do I need to delete the SVG icons from the splash folder for the proper working. Also do we need both files in both folders(values
and drawable
folders)?