NTP-7179 | Narayan | PPS Fast animation (#13278)
This commit is contained in:
committed by
GitHub
parent
23d3b605c3
commit
b6e372b3cd
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2024 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
|
||||
package com.navi.pay.management.common.paymentsummary.ui
|
||||
|
||||
import androidx.compose.animation.core.CubicBezierEasing
|
||||
|
||||
/** Reference : `FastOutSlowInEasing` from `androidx.compose.animation.core.Easing` */
|
||||
val SlowStartFastEndCustomEasing = CubicBezierEasing(0.51f, 0.1f, 0.26f, 0.93f)
|
||||
|
||||
val SlowStartFastEndSmoothCustomEasing = CubicBezierEasing(0.42f, 0.0f, 0.58f, 1.0f)
|
||||
@@ -17,8 +17,6 @@ import androidx.compose.animation.AnimatedContentScope
|
||||
import androidx.compose.animation.ExperimentalSharedTransitionApi
|
||||
import androidx.compose.animation.SharedTransitionLayout
|
||||
import androidx.compose.animation.SharedTransitionScope
|
||||
import androidx.compose.animation.core.FastOutLinearInEasing
|
||||
import androidx.compose.animation.core.LinearEasing
|
||||
import androidx.compose.animation.core.LinearOutSlowInEasing
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
@@ -410,7 +408,7 @@ fun PaymentSummaryScreenDiwali(
|
||||
tween(
|
||||
durationMillis =
|
||||
paymentSummaryViewModel.generalAnimationTransitionDuration,
|
||||
easing = LinearEasing,
|
||||
easing = SlowStartFastEndCustomEasing,
|
||||
)
|
||||
))
|
||||
.togetherWith(
|
||||
@@ -520,7 +518,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = smallScratchCardOnLandVisibilityAnimationDuration,
|
||||
easing = FastOutLinearInEasing,
|
||||
easing = SlowStartFastEndSmoothCustomEasing,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -530,7 +528,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = scratchCardSizeAnimationDuration,
|
||||
easing = FastOutLinearInEasing,
|
||||
easing = SlowStartFastEndSmoothCustomEasing,
|
||||
),
|
||||
label = EMPTY
|
||||
)
|
||||
@@ -550,7 +548,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
|
||||
animateContextScope,
|
||||
boundsTransform = { _, _ ->
|
||||
tween(
|
||||
scratchCardBottomMovementAnimationDuration,
|
||||
durationMillis = scratchCardBottomMovementAnimationDuration,
|
||||
easing = LinearOutSlowInEasing
|
||||
)
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ import androidx.compose.animation.AnimatedContentScope
|
||||
import androidx.compose.animation.ExperimentalSharedTransitionApi
|
||||
import androidx.compose.animation.SharedTransitionLayout
|
||||
import androidx.compose.animation.SharedTransitionScope
|
||||
import androidx.compose.animation.core.FastOutLinearInEasing
|
||||
import androidx.compose.animation.core.LinearEasing
|
||||
import androidx.compose.animation.core.LinearOutSlowInEasing
|
||||
import androidx.compose.animation.core.animateDpAsState
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
@@ -408,7 +406,7 @@ fun PaymentSummaryScreenV2(
|
||||
tween(
|
||||
durationMillis =
|
||||
paymentSummaryViewModel.generalAnimationTransitionDuration,
|
||||
easing = LinearEasing,
|
||||
easing = SlowStartFastEndCustomEasing,
|
||||
)
|
||||
))
|
||||
.togetherWith(
|
||||
@@ -518,7 +516,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = smallScratchCardOnLandVisibilityAnimationDuration,
|
||||
easing = FastOutLinearInEasing,
|
||||
easing = SlowStartFastEndSmoothCustomEasing,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -528,7 +526,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = scratchCardSizeAnimationDuration,
|
||||
easing = FastOutLinearInEasing,
|
||||
easing = SlowStartFastEndSmoothCustomEasing,
|
||||
),
|
||||
label = EMPTY
|
||||
)
|
||||
|
||||
@@ -764,8 +764,8 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection(
|
||||
animatedVisibilityScope = animateContextScope,
|
||||
boundsTransform = { _, _ ->
|
||||
tween(
|
||||
scratchCardBottomMovementAnimationDuration,
|
||||
easing = LinearOutSlowInEasing
|
||||
durationMillis = scratchCardBottomMovementAnimationDuration,
|
||||
easing = SlowStartFastEndSmoothCustomEasing
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -762,8 +762,8 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection(
|
||||
animatedVisibilityScope = animateContextScope,
|
||||
boundsTransform = { _, _ ->
|
||||
tween(
|
||||
scratchCardBottomMovementAnimationDuration,
|
||||
easing = LinearOutSlowInEasing
|
||||
durationMillis = scratchCardBottomMovementAnimationDuration,
|
||||
easing = SlowStartFastEndSmoothCustomEasing
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -641,9 +641,9 @@ constructor(
|
||||
|
||||
val rewardsNudgeDetailEntity = MutableStateFlow<NudgeDetailEntity?>(null)
|
||||
|
||||
val scratchCardFullSizeAnimationDuration = 200
|
||||
val scratchCardFullSizeAnimationDuration = 180
|
||||
val generalAnimationTransitionDuration =
|
||||
500 // Used for many transitions like main screen transition
|
||||
400 // Used for many transitions like main screen transition
|
||||
|
||||
val scratchAndWinButtonAnimationDuration =
|
||||
naviPayDefaultConfig
|
||||
@@ -657,7 +657,7 @@ constructor(
|
||||
)
|
||||
|
||||
private val mainScreenTransitionDelay = 400L
|
||||
private val scratchCardBottomStripeSectionVisibilityDelay = mainScreenTransitionDelay + 700L
|
||||
private val scratchCardBottomStripeSectionVisibilityDelay = mainScreenTransitionDelay + 600L
|
||||
|
||||
private val scratchCardRotationVisibilityDelay = mainScreenTransitionDelay + 200L
|
||||
|
||||
|
||||
Reference in New Issue
Block a user