The official document had reminded the developers to use the Androidx SplashScreen compat library to do the splash screen in the Android <= 11.
But it also has some limitations:
- icon animation is not supported -- AnimatedVectorDrawable
- icon background is not supported -- IconBackgroundColor
- brand logo is not supported -- BrandingImage
The link about the SplashScreen compat library:https://developer.android.google.cn/reference/kotlin/androidx/core/splashscreen/SplashScreen
You can set the windowSplashScreenBackground
in the Android <= 11 by the following code with the Androidx SplashScreen compat library.
<item name="windowSplashScreenBackground">@android:color/white</item>
In addition, the official document also sayed : Optionally, you can use windowSplashScreenBrandingImage to set an image to be shown at the bottom of the splash screen. The design guidelines recommend against using a branding image.
If you need more information, please check the official document:https://developer.android.google.cn/guide/topics/ui/splash-screen/migrate and
https://developer.android.com/guide/topics/ui/splash-screen
Furthermore, you need to set the theme in the <application>
and <Mainacticvity>
. Such as:
<application android:theme="@style/AppTheme"></application>
[Activity(Label = "@string/app_name", Theme = "@style/Theme.App.Starting", MainLauncher = true)]