It works fine in Android 11 (and below)
but when I install the app in Android 12, there is a white border around the icon in the splash screen (also a black border around the top app icon.)
Is there any way I can remove those borders? below is my splash code
<?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/colorBlack"/>
<item>
<bitmap
android:src="@drawable/notice"/>
</item>
</layer-list>
Also this line in my AndroidManifest.xml
android:roundIcon="@drawable/notice"
There seems a misusage in your terminology splash screen. It should be called Recents screen in the screen shots.
So this is not a problem about Splash screen. This should be a problem about a launcher icon using Adaptive icon.
By default, in template projects on Android Studio, the launcher icons in the Manifest are:
And both of mipmaps are:
Lastly, both of these
ic_launcher_foreground
andic_launcher_background
are vector drawables. (note that you can also use @color instead of a vector drawable)As you can notice,
layer-list
or bitmap is not used. You can use an Adaptive icon on API-26+.