https://kotlinlang.org logo
#compose
Title
# compose
m

MRSasko

01/03/2022, 9:04 AM
Hello, is there anybody who can help me out with compose animations? I need to disable the default AnimatedNavHost animations, but nothing seems to work. I have tried following: I am using:
implementation "com.google.accompanist:accompanist-navigation-animation:0.22.0-rc"
Copy code
AnimatedNavHost(navController, startDestination = Routes.Main.route,
        popEnterTransition = { EnterTransition.None },
        popExitTransition = { ExitTransition.None },
        enterTransition = { EnterTransition.None },
        exitTransition = { ExitTransition.None }
       ) {
        bottomNavGraph(navController = navController)
        userNavGraph(navController = navController)
    }
m

Marko Novakovic

01/03/2022, 10:07 AM
I think that
null
should work
and it’s the default
m

MRSasko

01/03/2022, 11:37 AM
@Marko Novakovic the enter and exit transitions are not nullable. So it will not work with null.
m

Marko Novakovic

01/03/2022, 12:43 PM
I missread this, I thought you want to cancel
composable
animation
k

Kimon

01/30/2022, 12:03 PM
@MRSasko I have the same problem. There always seems to be a vertical animation, even after using the transitions you mentioned. Have you found a solution to this?
2 Views