-
Notifications
You must be signed in to change notification settings - Fork 5
Compose Navigator Tutorials
Kaustubh Patange edited this page Jun 13, 2021
·
20 revisions
These are small tutorials that covers some specific implementation detail.
Navigator provides some custom enter
(FadeIn, SlideInRight, SlideInLeft, ShrinkIn) & exit
(FadeOut, SlideOutRight, SlideOutLeft, ShrinkOut) animation.
controller.navigateTo(dest) {
withAnimation {
enter = EnterAnimation.FadeIn
exit = ExitAnimation.FadeOut
}
}
On back press/back navigation these enter, exit animation will be played in reversed order. These information is also preserved accross configuration & process death.
controller.navigateTo(dest) {
singleTop = true // makes sure that there is only one instance of this destination in backstack.
}
controller.navigateTo(dest) {
popUpTo(dest) { // recursivly pops the backstack till the destination.
inclusive = true // inclusive
all = false // last added one will be chosen.
}
}