Created
April 17, 2026 17:28
-
-
Save AndroidPoet/1a35cd49b8f6014119d36fb2c769fe84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun AppNavigation(navController: NavController) { | |
| NavHost(navController, Route.Home) { | |
| composable<Route.Home>( | |
| enterTransition = { | |
| fadeIn() + slideInVertically { it / 2 } | |
| }, | |
| exitTransition = { | |
| fadeOut() + slideOutVertically { -it / 2 } | |
| } | |
| ) { | |
| HomeScreen(navController) | |
| } | |
| composable<Route.Detail>( | |
| enterTransition = { | |
| slideInHorizontally { it } + fadeIn() | |
| }, | |
| exitTransition = { | |
| slideOutHorizontally { it } + fadeOut() | |
| }, | |
| popEnterTransition = { | |
| slideInHorizontally { -it } + fadeIn() | |
| }, | |
| popExitTransition = { | |
| slideOutHorizontally { -it } + fadeOut() | |
| } | |
| ) { entry -> | |
| DetailScreen((entry.toRoute() as Route.Detail).id, navController) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment