-
Notifications
You must be signed in to change notification settings - Fork 72
Magellan 1.x Navigation
Ryan Moelter edited this page Jul 18, 2021
·
1 revision
In order to navigate from Screen
to Screen
, you need to use the Navigator
.
The Navigator
needs to be implemented in a way that survives rotation, and is responsible for:
-
Screen
navigation - Backstack control (and you get full control of it)
- Animations between
Screen
s (there are defaults, and you can override them if necessary)
Navigator.withRoot(new HomeScreen()).build();
Navigator.withRoot(new HomeScreen())
.transition(transition)
.maxEventTracked(100)
.loggingEnabled(BuildConfig.DEBUG)
.build();
goTo(screen)
goBack()
replace(screen)
goBackTo(screen)
goBackBefore(screen)
navigator.navigate(new HistoryRewriter() {
@Override
public void rewriteHistory(Deque<Screen> history) {
// Change history
}
});
navigator.overrideTransition(new TransitionToUseInsteadOfDefault()).goTo(new Screen());
Made with 💚 by the Wealthfront Android Team.