- Introduce
LazySetNavigator
for driving the lifecycle of previouslyNO_LIMIT
-ed navigables with a floor ofSHOWN
, rather thanCREATED
- Add
whenTransitionFinished(TransitionFinishedListener)
method toStep
, supporting an API available forScreen
- Introduce
LegacyJourney
for easier migration from 1.x. Similar toLegacyExpedition
, this construct allows nestingScreen
inside of aJourney
- Support non-idempotent navigation operations for
NavigationRequestHandler
. Operations will now be run once at most.
- Add
ViewTemplateApplier
to manipulate Navigable views at Navigator level
- Don't expose dialog state publicly
- Add
NavigationRequestHandler
to override navigation intents
- Add
LegacyStep
for easier migration from 1.x- Includes most things that a
Screen
had, including a similarScreen
/View
class split
- Includes most things that a
- Open up navigator to allow for easier extension
- Further improve testing support
- Make
LinearNavigator
an interface, and makeDefaultLinearNavigator
's constructor public - Create a
FakeLinearNavigator
as a test double, in themagellan-test
module
- Make
- Create a
SimpleJourney
forJourney
s that don't need custom display logic - Misc
- Fix a crash when navigating while the app is in the background
- Fix exception message for duplicate
Navigable
s in aDefaultLinearNavigator
backstack - Update built-in transitions to use
FastInSlowOutInterpolator
- Improve testing support
- Make
Journey.navigator
@VisibleForTesting
so we can access it in tests for verification - Make
transition
methods public, move fromLifecycleStateMachine
to extension functions onLifecycleAware
- Detach
LifecycleAware
objects attached usingby attachFieldToLifecycle
when field is set (usually in tests) - Full PR here
- Make
- Rename lifecycle-attaching delegates
by lifecycle(...)
->by attachFieldToLifecycle(...)
by lateinitLifecycle(..)
->by attachLateinitFieldToLifecycle(...)
by lifecycleWithContext(...)
->by createAndAttachFieldToLifecycleWhenShown(...)
- Rename some constructor parameters
Step(createBinding: (LayoutInflater) -> V)
->Step(inflateBinding: (LayoutInflater) -> V)
Journey(createBinding: (LayoutInflater) -> V, container: (V) -> ScreenContainer)
->Journey(inflateBinding: (LayoutInflater) -> V, getContainer: (V) -> ScreenContainer)
- Minor fix: Fix overlapping activities bug
- Minor fix: Update lifecycle logic when attaching to an Activity
- Release candidate for pushing to production
- Minor bug fixes
- Fix dialogs to show onResume
- Fix memory leaks
- Add shown coroutine scope to Step and screen
- Improved debugging
- Add state printer to get the lifecycle snapshot
- Improve the visualization of the backstack
- Added lifecycle limiter to better control over the lifecycle of the lifecycle objects
- Fix issues with the navigation delegate
- Improve testability
- Open classes for mockable
- Support for testing overloaded methods in the Navigator
- Added backwards compatibility for
- All the navigation methods
- ScreenLifecycleListener
- History re-writer
- NavigationType
- Added ability to turn off animations and logging
- Added ability to provide default transitions
- Breaking changes:
- Removed action bar related code
- Removed activity reference from screens
- Introduced journeys/steps which help with implementation the concept of flows
- Add support for lifecycle outside of screens/navigables
- Breaking changes:
- Added nullability annotation
- Replaced NavigationType with MagellanTransition
- API change for History rewriting
- And a lot more...
- Add support for RxJava 2 in
magellan-rx2
(thanks @FabianTerhorst) - Add
whenTransitionFinished(TransitionFinishedListener)
method to delay the execution of a code block until after the transition into the current screen is finished. This allows one to, for example, delay view updates until the transition has finished to avoid dropping frames. - Add
Navigator.goBackTo()
with navigation type - Add
Screen.setTitle(CharSequence)
instead of requiring a string resource - Add
Screen.inflate()
without context argument (thanks @theyann)