UI优化
This commit is contained in:
@@ -284,7 +284,35 @@ fun NavigationController(
|
||||
}
|
||||
composable(
|
||||
route = NavigationRoute.AccountProfile.route,
|
||||
arguments = listOf(navArgument("id") { type = NavType.StringType })
|
||||
arguments = listOf(navArgument("id") { type = NavType.StringType }),
|
||||
enterTransition = {
|
||||
// iOS push: new screen slides in from the right
|
||||
slideInHorizontally(
|
||||
initialOffsetX = { fullWidth -> fullWidth },
|
||||
animationSpec = tween(durationMillis = 280)
|
||||
)
|
||||
},
|
||||
exitTransition = {
|
||||
// iOS push: previous screen shifts slightly left (parallax)
|
||||
slideOutHorizontally(
|
||||
targetOffsetX = { fullWidth -> -fullWidth / 3 },
|
||||
animationSpec = tween(durationMillis = 280)
|
||||
)
|
||||
},
|
||||
popEnterTransition = {
|
||||
// iOS pop: previous screen slides back from slight left offset
|
||||
slideInHorizontally(
|
||||
initialOffsetX = { fullWidth -> -fullWidth / 3 },
|
||||
animationSpec = tween(durationMillis = 280)
|
||||
)
|
||||
},
|
||||
popExitTransition = {
|
||||
// iOS pop: current screen slides out to the right
|
||||
slideOutHorizontally(
|
||||
targetOffsetX = { fullWidth -> fullWidth },
|
||||
animationSpec = tween(durationMillis = 280)
|
||||
)
|
||||
}
|
||||
) {
|
||||
CompositionLocalProvider(
|
||||
LocalAnimatedContentScope provides this,
|
||||
|
||||
Reference in New Issue
Block a user