Starting in Android 12, the
SplashScreen API lets apps launch
with animation, including an into-app motion at launch, a splash screen showing
your app icon, and a transition to your app itself. A SplashScreen is a
Window and
therefore covers an
Activity.
The splash screen experience brings standard design elements to every app launch, but it's also customizable so your app can maintain its unique branding.
In addition to using the SplashScreen platform API, you can also use the
SplashScreen
compat library, which wraps the SplashScreen API.
How the splash screen works
When a user launches an app while the app's process isn't running (a cold
start) or the Activity isn't
created (a warm start), the
following events occur:
The system shows the splash screen using themes and any animations that you define.
When the app is ready, the splash screen is dismissed and the app displays.
The splash screen never shows during a hot start.
Elements and mechanics of the splash screen
The elements of the splash screen are defined by XML resource files in the Android manifest file. There are light and dark mode versions for each element.
The customizable elements of a splash screen consist of the app icon, icon background, and window background:
Consider the following elements, shown in figure 2:
1 The app icon must be a vector drawable. It can be static or animated. Although animations can have an unlimited duration, we recommend not exceeding 1,000 milliseconds. The launcher icon is the default.
2 The icon background is optional and useful if you need more contrast between the icon and the window background. If you use an adaptive icon, its background is displayed if there is enough contrast with the window background.
3 As with adaptive icons, one-third of the foreground is masked.
4 The window background consists of a single opaque color. If the window background is set and is a plain color, it is used by default if the attribute isn't set.
Splash screen dimensions
The splash screen icon uses the same specifications as adaptive icons, as follows:
- Branded image: this must be 200×80 dp.
- App icon with an icon background: this must be 240×240 dp and fit within a circle 160 dp in diameter.
- App icon without an icon background: this must be 288×288 dp and fit within a circle 192 dp in diameter.
For example, if the full size of an image is 300×300 dp, the icon needs to fit within a circle with a diameter of 200 dp. Everything outside the circle turns invisible (masked).
Splash screen animations and the launch sequence
Additional latency is often associated with launching an app on a cold start. Adding an animated icon to your splash screen has obvious aesthetic appeal and provides a more premium experience. User research shows that perceived startup time is less when viewing an animation.
A splash screen animation is embedded within the launch sequence components, as shown in figure 4.
Enter animation: this consists of the system view to the splash screen. It is controlled by the system and isn't customizable.
Splash screen (shown during the "wait" portion of the sequence): the splash screen can be customized, letting you supply your own logo animation and branding. It must meet the requirements described in this page to work properly.
Exit animation: this consists of the animation that hides the splash screen. If you want to customize it, use the
SplashScreenViewand its icon. You can run any animation on them, with settings for transform, opacity, and color. In this case, manually remove the splash screen when the animation is done.
When running the icon animation, app launch gives you the option to skip the
sequence in cases where the app is ready earlier. The app triggers onResume()
or the splash screen times out automatically, so make sure the motion can be
comfortably skipped. The splash screen must only be dismissed with onResume()
when the app is stable from a visual standpoint, so no additional spinners are
needed. Introducing an incomplete interface can be jarring for users and might
give an impression of unpredictability or lack of polish.
Splash screen animation requirements
Your splash screen must adhere to the following specifications:
Set a single window background color with no transparency. Day and Night mode are supported with the
SplashScreencompat library.Make sure the animated icon meets the following specifications:
- Format: the icon must be an AnimatedVectorDrawable (AVD) XML.
- Dimensions: an AVD icon must be four times the size of an adaptive
icon, as follows:
- The icon area must be 432 dp—in other words, four times the 108 dp area of an unmasked adaptive icon.
- The inner two-thirds of the image is visible on the launcher icon, and must be 288 dp—in other words, four times the 72 dp that makes up the inner masked area of an adaptive icon.
- Duration: we recommend not exceeding 1,000 ms on phones. You can use a delayed start, but this can't be longer than 166 ms. If the app startup time is longer than 1,000 ms, consider a looping animation.
Establish an appropriate time to dismiss the splash screen, which happens as your app draws its first frame. You can further customize this as described in the section about keeping the splash screen on-screen for longer periods.
Splash screen resources
Download the example starter kit, which demonstrates how to create, format, and export an animation into an AVD. It includes the following:
- Adobe After Effects project file of the animation.
- Final exported AVD XML