A library for managing Android Activity UI states, navigation, and history with lifecycle-aware resource management.
Flow is an Android library that helps developers manage UI states, navigation, and history within an Activity. It solves the problem of handling complex UI flows, supporting the back button, and preserving state across configuration changes and process death. By representing UI states as immutable key objects, Flow provides a predictable way to navigate and manage resources.
Android developers building apps with complex navigation patterns, such as master-detail views, layered screens, or dialog-heavy interfaces, who need robust state persistence and lifecycle management.
Developers choose Flow for its explicit approach to naming UI states, automatic history tracking, and seamless handling of Android lifecycle events. It simplifies resource management and ensures consistent behavior across navigation, making it easier to build maintainable and resilient Android apps.
Name UI states, navigate between them, remember where you've been.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Flow uses immutable key objects to represent discrete UI states, making state identification and comparison straightforward, as shown with examples like ArticleKey in the README.
It remembers UI state and navigation history across configuration changes and process death, handling Android lifecycle events automatically with custom key serialization.
Provides setup and tear-down hooks for resources tied to UI states via ServicesFactory, ensuring proper management and disposal when states change.
Allows plugging in custom dispatchers to control how navigation updates the UI, offering flexibility for complex scenarios like master-detail views.
The library is deprecated, with new use strongly discouraged and Square moving to Workflow, meaning no updates, bug fixes, or community support.
Requires manual installation in Activity and custom key serialization via KeyParceler, which can be more involved compared to modern, integrated solutions.
As a deprecated library, it lacks compatibility with newer Android development practices and tools, such as Kotlin coroutines or Jetpack Compose.