Skip to content

Commit

Permalink
Updates animation.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmuvi-stripe committed Feb 24, 2025
1 parent 7ca1223 commit 269ee27
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ package com.stripe.android.link.ui.wallet

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.animateContentSize
import androidx.compose.animation.core.FiniteAnimationSpec
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.VisibilityThreshold
import androidx.compose.animation.core.spring
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.border
Expand Down Expand Up @@ -41,6 +45,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import com.stripe.android.core.strings.ResolvableString
import com.stripe.android.core.strings.resolvableString
Expand Down Expand Up @@ -446,7 +451,14 @@ private fun PaymentDetailsList(
) { item ->
PaymentDetailsListItem(
modifier = Modifier
.animateItemPlacement()
.animateItem(
fadeInSpec = null,
placementSpec = spring(
stiffness = Spring.StiffnessMediumLow,
visibilityThreshold = IntOffset.VisibilityThreshold
),
fadeOutSpec = null
)
.testTag(WALLET_SCREEN_PAYMENT_METHODS_LIST),
paymentDetails = item,
enabled = isEnabled,
Expand Down

0 comments on commit 269ee27

Please sign in to comment.