~/talk

Road to Single Activity

Talkat DroidKaigi 2024 · 2024-09-11..09-13· [android, frontend-architecture]
name:yurihondo
links:none on file
slides:none on file

Migrates a large Android app from Fragments/AndroidView to Jetpack Compose and consolidates many Activities into one working main activity, using Navigation Compose 2.7.7 with nested and common NavGraphs. Implements multi-backstack via saveState/restoreState and a BackHandler-driven history queue to reproduce tab selection history, replaces activity‑for‑result with backstack SavedStateHandle passing, and routes complex deep links through a custom DeepLinkNavigator. Result: single‑activity architecture achieved and sample repo published.

AI-written summary · about

  1. 0:00Introduction
  2. 4:17App background and features
  3. 7:32Purpose of migrating from fragments to Compose
  4. 10:44Migration overview and phases
  5. 11:04Phase 1: Compose UI
  6. 17:12Integrating common screens into graph
  7. 19:37NavHost implementation and graph connection
  8. 20:21Phase 2: Graph integration
  9. 21:47Tab behavior and back stack management
  10. 27:13Handling back events
  11. 30:30Basic Single Activity setup
  12. 31:55Replacing Activity Result
  13. 32:40Tab display state control
  14. 35:46Restoring tab state on back
  15. 36:51Deep link navigation integration
  16. 40:22Single Activity completion
  17. 40:44Migration results and future outlook
  18. 41:30Sample implementation and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.