Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement new pb spec with decelerate interpolator #71

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading