You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gabor Varadi edited this page Jun 1, 2020
·
6 revisions
The big picture
Simple-Stack manages a list of parcelables that represent the navigation history. These can also be associated with a scope, where this scope can describe services that should be available for a given screen. These services can receive lifecycle callbacks and support saved-state persistence.
This allows simple, declarative way to describe the classes we need on a given screen, while also receiving important callbacks to make our app survive configuration changes and process death reliably.
Navigator
The Navigator allows automatic installation of the Backstack, so that you don't need to worry about providing the right lifecycle callbacks.
It also makes the Backstack accessible from any class that has access to the Activity context (for example, fragments or views).
When using custom views, it can be even as simple as Navigator.install(activity, container, History.of(InitialScreen()).
When using fragments, this typically requires the activity to be a NavigationHandler, that delegates the navigation state changes to the FragmentStateChanger.