Skip to content

Commit

Permalink
Restore navigation animations
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Jul 8, 2024
1 parent 3f63837 commit 792bad0
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import FeedFlowTheme
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.AnimatedContentTransitionScope.SlideDirection
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -128,10 +131,10 @@ class MainActivity : ComponentActivity() {
NavHost(
navController = navController,
startDestination = Screen.Home.name,
// enterTransition = { MotionDefaults.sharedXAxisEnter(density) },
// exitTransition = { MotionDefaults.sharedXAxisExit(density) },
// popEnterTransition = { MotionDefaults.sharedXAxisPopEnter(density) },
// popExitTransition = { MotionDefaults.sharedXAxisPopExit(density) },
enterTransition = { fadeIn() + slideIntoContainer(SlideDirection.Start) },
exitTransition = { fadeOut() + slideOutOfContainer(SlideDirection.Start) },
popEnterTransition = { fadeIn() + slideIntoContainer(SlideDirection.End) },
popExitTransition = { fadeOut() + slideOutOfContainer(SlideDirection.End) },
) {
composable(Screen.Home.name) {
HomeScreen(
Expand Down

0 comments on commit 792bad0

Please sign in to comment.