Skip to content

Commit

Permalink
implement new pb spec with declerate intepolator
Browse files Browse the repository at this point in the history
  • Loading branch information
trambui09 committed May 2, 2024
1 parent 5bffebb commit 7fcaa33
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions app/src/main/java/com/google/android/samples/socialite/ui/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import android.app.Activity
import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.tween
Expand Down Expand Up @@ -83,10 +84,28 @@ fun MainNavigation(
navController = navController,
startDestination = "home",
popEnterTransition = {
scaleIn(initialScale = 1.1F) + fadeIn()
scaleIn(
animationSpec = tween(
durationMillis = 100,
delayMillis = 35
),
initialScale = 1.1F
) + fadeIn(
animationSpec = tween(
durationMillis = 100,
delayMillis = 35
)
)
},
popExitTransition = {
scaleOut(targetScale = 0.9F) + fadeOut()
scaleOut(
targetScale = 0.9F
) + fadeOut(
animationSpec = tween(
durationMillis = 35,
easing = CubicBezierEasing(0.1f, 0.1f, 0f, 1f)
)
)
},
modifier = modifier,
) {
Expand Down

0 comments on commit 7fcaa33

Please sign in to comment.