Skip to content

Commit

Permalink
Merge pull request #35 from android/nav_compose
Browse files Browse the repository at this point in the history
Update Predictive Back animation
  • Loading branch information
ashnohe authored Mar 18, 2024
2 parents a0da715 + d3b386f commit 07817f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.scaleIn
import androidx.compose.animation.scaleOut
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -80,10 +82,12 @@ fun MainNavigation(
NavHost(
navController = navController,
startDestination = "home",
enterTransition = { AnimationConstants.enterTransition },
popEnterTransition = { AnimationConstants.enterTransition },
exitTransition = { AnimationConstants.exitTransition },
popExitTransition = { AnimationConstants.exitTransition },
popEnterTransition = {
scaleIn(initialScale = 0.9F) + fadeIn()
},
popExitTransition = {
scaleOut(targetScale = 0.9F) + fadeOut()
},
modifier = modifier,
) {
composable(
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ksp = "1.9.20-1.0.14"
lifecycle = "2.7.0-rc02"
material3 = "1.2.0-beta01"
media3 = "1.3.0-rc01"
navigation = "2.8.0-alpha03"
navigation = "2.8.0-alpha04"
profileinstaller = "1.3.1"
room = "2.6.1"
spotless = "6.24.0"
Expand Down

0 comments on commit 07817f8

Please sign in to comment.