In the google I/O presentation, google team says that we can disable the default splash screen. I want to do that but I couldn't find the way to do it.
Has anyone able to achieve this?
Later edit:
I misunderstood what speakers told in that video. It seems that you can only edit the default splash screen, not disabling it.
On Android 12, it's not possible to opt out of the splash screen. It' only possible to customize it: icon, window background, exit animation.
By default, the splash screen is shown from user touch until the first frame of your application is drawn, so to minimize the time during which the splash screen is shown, you can try to reduce the launch time of your application.
You can also implement you own exit animation so the transition from the splash screen to the app is more seamless.
If you previously used a dedicated SplashScreenActivity and want to keep that activity, then here is the workaround from official docs.
Unfortunately, you cannot disable the default splash screen directly on Android 12 devices through the APIs they've provided.
If your app has a custom splash screen & you don't want to migrate to this new approach you can try the following hack.
Basically what you've to do is override your splash screen theme in res\values-v31\themes.xml
& set a transparent icon.
<!-- My custom theme for splash screen activity -->
<style name="Theme.Splash" parent="Theme.Main">
<item name="android:windowBackground">@color/background</item>
<!-- Set a transparent .png as your icon -->
<item name="android:windowSplashScreenAnimatedIcon">@drawable/transparent_image</item>
</style>
This will get you rid of the default app icon that appears during splash when the app is launch.
you can add this line:
<item name="android:windowIsTranslucent">true</item>
in your style.xml file before close style tag. it`s make your default android splash transparent!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With