NTP-7179 | Narayan | PPS Fast and smooth animation for BBPS (#13325)
This commit is contained in:
committed by
GitHub
parent
98d629a933
commit
dd11811a3f
@@ -14,7 +14,6 @@ import androidx.compose.animation.AnimatedVisibility
|
||||
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
|
||||
@@ -390,7 +389,7 @@ fun BbpsPostPaymentScreenV2(
|
||||
durationMillis =
|
||||
bbpsTransactionDetailsViewModel
|
||||
.generalAnimationTransitionDuration,
|
||||
easing = LinearEasing,
|
||||
easing = SlowStartFastEndCustomEasing,
|
||||
)
|
||||
))
|
||||
.togetherWith(
|
||||
@@ -1565,7 +1564,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = smallScratchCardOnLandVisibilityAnimationDuration,
|
||||
easing = FastOutLinearInEasing,
|
||||
easing = SlowStartFastEndSmoothCustomEasing,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1575,7 +1574,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = scratchCardSizeAnimationDuration,
|
||||
easing = FastOutLinearInEasing,
|
||||
easing = SlowStartFastEndSmoothCustomEasing,
|
||||
),
|
||||
label = com.navi.common.utils.EMPTY
|
||||
)
|
||||
@@ -1993,7 +1992,7 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection(
|
||||
boundsTransform = { _, _ ->
|
||||
tween(
|
||||
scratchCardBottomMovementAnimationDuration,
|
||||
easing = LinearOutSlowInEasing
|
||||
easing = SlowStartFastEndSmoothCustomEasing
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2024 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
|
||||
package com.navi.bbps.feature.transactiondetails.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)
|
||||
@@ -169,13 +169,13 @@ constructor(
|
||||
|
||||
private val mainScreenTransitionDelay = 600L
|
||||
|
||||
val scratchCardFullSizeAnimationDuration = 200
|
||||
val scratchCardFullSizeAnimationDuration = 180
|
||||
|
||||
val scratchCardBottomMovementAnimationDuration = 800
|
||||
|
||||
val smallScratchCardOnLandVisibilityAnimationDuration = 100
|
||||
|
||||
private val scratchCardBottomStripeSectionVisibilityDelay = mainScreenTransitionDelay + 700L
|
||||
private val scratchCardBottomStripeSectionVisibilityDelay = mainScreenTransitionDelay + 600L
|
||||
|
||||
private val scratchCardRotationVisibilityDelay = mainScreenTransitionDelay + 200L
|
||||
|
||||
@@ -192,7 +192,7 @@ constructor(
|
||||
private val _naviBbpsDefaultConfig = MutableStateFlow(NaviBbpsDefaultConfig())
|
||||
val naviBbpsDefaultConfig = _naviBbpsDefaultConfig.asStateFlow()
|
||||
|
||||
val generalAnimationTransitionDuration = 500
|
||||
val generalAnimationTransitionDuration = 400
|
||||
|
||||
val scratchAndWinButtonAnimationDelay = generalAnimationTransitionDuration + 600L
|
||||
|
||||
|
||||
Reference in New Issue
Block a user