From 1a5512f1c243ab876cad46fc6fd575c2f3f82449 Mon Sep 17 00:00:00 2001 From: Thirfir Date: Mon, 16 Dec 2024 15:49:11 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=8A=B8=EB=9E=9C=EC=A7=80=EC=85=98=20?= =?UTF-8?q?=EC=88=98=EC=B9=98=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../in/koreatech/bus/animation/NavigationAnimation.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/feature/bus/src/main/java/in/koreatech/bus/animation/NavigationAnimation.kt b/feature/bus/src/main/java/in/koreatech/bus/animation/NavigationAnimation.kt index ffde07ae9..4cc01bc59 100644 --- a/feature/bus/src/main/java/in/koreatech/bus/animation/NavigationAnimation.kt +++ b/feature/bus/src/main/java/in/koreatech/bus/animation/NavigationAnimation.kt @@ -11,7 +11,8 @@ import androidx.compose.ui.graphics.Color private const val TRANSITION_DURATION = 400 private const val FADE_RATIO = .55f -private const val SLIDE_RATIO = .85f +private const val SCALE_RATIO = .9f +private const val SLIDE_DIVIDE_RATIO = 3 internal val defaultOutsideColor = Color(0xFF282828) @@ -25,11 +26,11 @@ internal fun AnimatedContentTransitionScope.defaultExitTransition() = fade targetAlpha = FADE_RATIO ) + scaleOut( animationSpec = tween(TRANSITION_DURATION), - targetScale = SLIDE_RATIO + targetScale = SCALE_RATIO ) + slideOutOfContainer( towards = AnimatedContentTransitionScope.SlideDirection.Left, animationSpec = tween(TRANSITION_DURATION), - targetOffset = { it / 4 } + targetOffset = { it / SLIDE_DIVIDE_RATIO } ) internal fun AnimatedContentTransitionScope.defaultPopEnterTransition() = fadeIn( @@ -37,11 +38,11 @@ internal fun AnimatedContentTransitionScope.defaultPopEnterTransition() = initialAlpha = FADE_RATIO ) + scaleIn( animationSpec = tween(TRANSITION_DURATION), - initialScale = SLIDE_RATIO + initialScale = SCALE_RATIO ) + slideIntoContainer( towards = AnimatedContentTransitionScope.SlideDirection.Right, animationSpec = tween(TRANSITION_DURATION), - initialOffset = { it / 4 } + initialOffset = { it / SLIDE_DIVIDE_RATIO } ) internal fun AnimatedContentTransitionScope.defaultPopExitTransition() = slideOutOfContainer(