~/talk

Android Jetpack: How to smartly use fragments in your UI

Talkat Google I/O 2018 · 2018-05-08..05-10· [android, frontend-architecture]
links:none on file
slides:none on file

Architecture Components reposition fragments as UI-policy containers rather than grab‑all objects: use ViewModel + LiveData for retained data, replace headless retained fragments, and prefer the Navigation component to manage back stack and animations so you avoid manual async fragment transactions (use commitNow only when safe). Fragment inflation and DialogFragment remain useful for self‑contained screens, ads or important prompts. android.app.Fragment is deprecated; rely on AndroidX fragments and the new lifecycle guarantees for predictable behavior.

AI-written summary · about

  1. 0:00Origins of fragments
  2. 2:04Design and legacy
  3. 4:40Decomposing activities
  4. 7:34State management challenges
  5. 10:03Architecture components
  6. 12:35Lifecycle and observers
  7. 15:54View models vs fragments
  8. 18:56Live data usage
  9. 21:31Fragment transactions
  10. 24:19Navigation component
  11. 27:38Role of fragments today
  12. 30:43Content-based fragments
  13. 33:47Dialog fragments
  14. 37:15Menu and toolbar management
  15. 39:34Testing and modernization
  16. 42:06Future and deprecation
~/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.