An alternative to fragments: Say Hello to Mortar & Flow
summary
Mortar with Dagger and Flow replace fragments by managing scoped dependency graphs, presenter lifecycles and navigation for plain views. Mortar with Dagger creates scoped subgraphs that are created for a screen or wizard and torn down afterward, keeping memory small; presenters are presenter singleton survives rotation so UI state survives configuration changes. Flow backstack and set/setHistory/goBack handle navigation and persistence (JSON/Parceler), and custom view transitions run in a PathContainer.
AI-written summary · about
chapters (10)
- 0:00Introduction to flow/mortar
- 2:23Beyond standard fragments
- 4:47Core library concepts
- 8:14Architecture and implementation
- 12:32Managing scopes and state
- 18:15Navigation and history
- 20:13Transitions and animations
- 23:23State persistence
- 25:11Advanced lifecycle handling
- 29:33Conclusion and demo
related talks
33mFear No Fragments
37mWhat To Do About Fragments? (en)
29mNavigation and Dependency Injection in Compose
30mFragments: What are they good for.
56mYou've been told lies about Fragments
46mModern Android: How to ditch Activities and Fragments
34mArchitectures in the Compose World
30mModern Compose Architecture with Circuit
