~/talk

Navigation Component, feedback from the trench

Talkat droidcon Italy 2019 · 2019-04-04..04-05· [android, frontend-architecture]
slides:none on file

Explains concrete tradeoffs of Navigation Component with real code patterns: testing by faking NavController, a flow manager that centralises navigation logic, and dealing with a 66‑screen form flow that needed a map of destination->action. Shows hacks that work — a custom fragment_tab navigator and using multiple NavHost instances to keep per‑tab back stacks — plus a Gradle trick for shared nav graphs in multi‑module projects. Mentions where the library crashes (restore state on rotate) and what actually works.

AI-written summary · about

  1. 0:00Navigation Component Feedback From The Trench
  2. 1:39Slides bit.ly/nav-component
  3. 2:17The big picture
  4. 3:45A basic example
  5. 10:49Additional features
  6. 12:20Specific use cases
  7. 18:07Testing the navigation
  8. 20:34Conditional navigation
  9. 23:07When a destination contains a single action, use a generic ID
  10. 29:59Handling multi start points
  11. 35:09Fragmentless navigation
  12. 37:39Bottom navigation
  13. 40:45The problem: Fragments are destroyed when a tab is opened
  14. 42:12The hack: Use several NavHostFragments to create several back stacks
  15. 43:35Multi module navigation
  16. 45:54Missing navigation IDs in the features
  17. 46:23Let's look at the SafeArgs Gradle plugin source code!
  18. 47:382 lines fix, using an official API
  19. 47:57Single Activity?
  20. 48:07Nav Component works perfectly on multi activities pattern
~/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.