@@ -394,47 +394,9 @@ fun VideoDetailScreen(modifier: Modifier, navController: NavHostController) {
394394 }
395395 }
396396 }
397- AnimatedContent (
397+ Crossfade (
398398 targetState = uiState.pageState,
399- transitionSpec = {
400- when {
401- targetState == VideoDetailPageState .DETAIL_PAGE &&
402- initialState == VideoDetailPageState .BOTTOM_PLAYER -> {
403- slideInVertically(
404- initialOffsetY = { it },
405- animationSpec = tween(durationMillis = 250 )
406- ) + fadeIn(
407- animationSpec = tween(durationMillis = 250 )
408- ) togetherWith slideOutVertically(
409- targetOffsetY = { - it },
410- animationSpec = tween(durationMillis = 250 )
411- ) + fadeOut(
412- animationSpec = tween(durationMillis = 250 )
413- )
414- }
415- targetState == VideoDetailPageState .BOTTOM_PLAYER &&
416- initialState == VideoDetailPageState .DETAIL_PAGE -> {
417- slideInVertically(
418- initialOffsetY = { - it },
419- animationSpec = tween(durationMillis = 250 )
420- ) + fadeIn(
421- animationSpec = tween(durationMillis = 250 )
422- ) togetherWith slideOutVertically(
423- targetOffsetY = { it },
424- animationSpec = tween(durationMillis = 250 )
425- ) + fadeOut(
426- animationSpec = tween(durationMillis = 250 )
427- )
428- }
429- else -> {
430- fadeIn(
431- animationSpec = tween(durationMillis = 250 )
432- ) togetherWith fadeOut(
433- animationSpec = tween(durationMillis = 250 )
434- )
435- }
436- } using SizeTransform (clip = false )
437- },
399+ animationSpec = tween(durationMillis = 300 ),
438400 label = " pageStateTransition"
439401 ) { pageState ->
440402 Box (
0 commit comments