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,
|
||||
|
||||
@@ -137,7 +137,16 @@ fun FollowItem(
|
||||
val context = LocalContext.current
|
||||
val navController = LocalNavController.current
|
||||
Box(
|
||||
modifier = Modifier.padding(vertical = 16.dp)
|
||||
modifier = Modifier
|
||||
.padding(vertical = 16.dp)
|
||||
.noRippleClickable {
|
||||
navController.navigate(
|
||||
NavigationRoute.AccountProfile.route.replace(
|
||||
"{id}",
|
||||
userId.toString()
|
||||
)
|
||||
)
|
||||
}
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
@@ -150,14 +159,6 @@ fun FollowItem(
|
||||
modifier = Modifier
|
||||
.size(40.dp)
|
||||
.clip(CircleShape)
|
||||
.noRippleClickable {
|
||||
navController.navigate(
|
||||
NavigationRoute.AccountProfile.route.replace(
|
||||
"{id}",
|
||||
userId.toString()
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
Spacer(modifier = Modifier.width(12.dp))
|
||||
Column(
|
||||
|
||||
Reference in New Issue
Block a user