Single activity navigation so simple even I can understand it
summary
Claims a concrete architecture: MVP plus reactive state using rxjava and a few base classes to build a single-activity flow with no fragments. It implements a centralized dispatcher stream that emits immutable state data classes, wraps screen states into creating/showing states, and manages a state-backed backstack so forward and back navigation work. The repo contains a sample app that wires presenters/views to the dispatcher and demonstrates the pattern in practice.
AI-written summary · about
chapters (16)
- 0:00Introduction to state
- 1:04What is state?
- 2:20The state management struggle
- 3:42Centralized state dispatching
- 5:05Limitations of old patterns
- 6:47Avoiding circular dependence
- 8:01Implementing the dispatcher
- 9:32Building the state stream
- 11:04Visualizing state flow
- 13:03Decoupling components
- 14:53Handling UI visibility
- 17:07Modeling navigation as state
- 18:29Screen creators
- 20:28Coding the navigation flow
- 22:27Managing the back stack
- 23:51Summary and resources
related talks
53mSimplified Single-Activity Apps Using Simple-Stack
39mSingle activity: Why, when, and how
46mModern Android: How to ditch Activities and Fragments
37mSingle Activity by Example
42mRoad to Single Activity
30mArchitecting an app with MVP and ViewModels
06m10 best practices for moving to a single activity
38mMigrating to a Single-Activity Architecture in a Modular App
