google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.43k stars 598 forks source link

[Navigation Animation] Is there a way to remove crossfade when navigating ? #1575

Closed gastsail closed 1 year ago

gastsail commented 1 year ago

Description Currently when I navigate from one place to another adding either exitTransition or enterTransition as

slideOutOfContainer(
                AnimatedContentScope.SlideDirection.Right, animationSpec = tween(300)
            )

I get a fade effect meanwhile the animation is taking place, this does not look good for UX in the app and overlaps the current navigated view with the one making the navigation request.

Is there any way of removing the fade before navigating ?

jbw0033 commented 1 year ago

You can us the Animation compose EnterTransition.None and ExitTransition.None APIs to avoid the default crossfade.