Welcome to the first episode of "Taxim", in this tutorial we will learn how to implement the new android 12 splash screen in our app.
The new Android 12 introduces a revamped splash screen feature in Android Studio. This splash screen is the first screen that appears when you open your app and is also known as the startup or launch screen. Here are some key points to include in your blog post:
SplashScreen API: Starting in Android 12, the SplashScreen API allows apps to launch with animation, including an into-app motion at launch and a splash screen displaying your app icon. This API provides a more engaging and visually appealing experience for users.
Migrating to Android 12: If you're already implementing a splash screen in your app, you'll need to migrate it to the new Android 12 splash screen implementation. By default, the system splash screen is constructed using your app's launcher icon element and the windowBackground of your theme. However, you can customize it further if needed.
Benefits of the New Splash Screen: The new splash screen feature in Android 12 offers several benefits. It enhances the overall user experience by providing a smooth transition from the app launch to the main interface. It also allows you to showcase your app's branding and identity right from the start.
Implementation Considerations: While implementing the new splash screen, you may encounter some issues or bugs. For example, there have been reports of the splash screen icon not displaying when the app is launched through Android Studio. In such cases, killing the app and launching it from the menu can resolve the issue.
The splash screen dependency :
implementation("androidx.core:core-splashscreen:1.0.0")
The style :
<style name="Theme.App.Starting" parent="Theme.SplashScreen"><!-- Set the splash screen background, animated icon, and animationduration. --><item name="windowSplashScreenBackground">@color/...</item><!-- Use windowSplashScreenAnimatedIcon to add a drawable or an animateddrawable. One of these is required. --><item name="windowSplashScreenAnimatedIcon">@drawable/...</item><!-- Required for animated icons. --><item name="windowSplashScreenAnimationDuration">200</item><!-- Set the theme of the Activity that directly follows your splashscreen. This is required. --><item name="postSplashScreenTheme">@style/Theme.App</item></style>
Watch the video :
