Search code examples
androidkotlinthemessplash-screen

Splash approach in single activity shows everywhere splash theme


I use this approach in my single activity app - Splash-screen approach in single Activity app But everywhere in my layouts I see splash theme and this prevents me from working with views in Android Studio. Can someone help me with this?


Solution

  • Android 12 now has a SplashScreen API, which enables a new app launch animation for all apps when running on a device with Android 12 or higher. This includes an into-app motion at launch, a splash screen showing your app icon, and a transition to your app itself, and for that, you don't need a Splash Activity.

    As for your app, you need to set the theme only for SplashActivity. For other activity, set the theme to be the default one.