Is it possible to properly use the SplashScreen compat library (https://developer.android.com/about/versions/12/splash-screen-migration#splashscreen_compat_library) with Jetpack Compose? It is desirable to immediately call setContent in onCreate, like so:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
installSplashScreen()
setContent {
// ...
}
}
}
However, setContent replaces the root view when it finishes loading. Therefore, the splash screen exit animation does not finish. The alternative is to call setContent when the exit animation finishes, but this is inefficient. Is there any other alternative?