Complicated lifecycle • Suppose to make things easier and reusable • Be cautious checking if the state is valid whenever switching fragments • Can be clutted with both view and business logic
/ sub flows • Nested flows - Similar to nested Fragments when used to encapsulate a specific flow within an app. • Nested flows are better because a parents flow and inject data into the child flow such as the state during a compose flow
Each Screen in turn has its own Module (adds to Object Graph) • This module is added to a parent Module and its contents can be injected in the Presenter and View • Per MVP concept, both Presenter and View have an instance of one another • The View notifies the Presenter when it is ready • The injected Model is used by the Presenter to init the View
Flow and FlowDelegate classes • Flow holds the navigation history • Each Entry contains the Screen/Path object • FlowDelegate propagates a onSaveInstanceState call to the Flow which persists the history • Each Screen/Path is converted into a Parcelable object • Parcelable converter could serialize the Path into JSON
onPause, onResume, onActivityResult • Examples: Sign on integrations, external resizing activity, custom Camera integration • Easy way - set explicit callbacks on *Your*Activity • Better - Manager that Presenters can register and unregister for lifecycle events
class • Unique Annotation for each setting • Separate SettingsModule that is included in the RootModule • No SettingsManager needed and each settings value can be provided as needed
view animations - Both projects are still actively changing + Presenters could be tested + Mortar with Dagger make DI easy - Screen/Path’s modules (or components)