~/talk

How to Survive the Lifecicle

Talkat droidcon Berlin 2018 · 2018-06-25..06-27· [android, frontend-architecture]
links:none on file
slides:none on file

Android X adds a third lifecycle — the viewLifecycleOwner — to fix stale UI and observer leaks when fragments detach and reattach. Use LiveData + ViewModel for retained state, observe use‑case streams with the fragment lifecycle and observe view state with viewLifecycleOwner in onViewCreated, or pass the lifecycle into reusable views / data binding. A concrete Kotlin pattern builds custom view composition that registers observers on attach and auto‑removes them on destroy, eliminating boilerplate and memory leaks.

AI-written summary · about

  1. 0:00Introduction to lifecycle
  2. 3:07LiveData and ViewModel basics
  3. 8:27Fragment rotation case
  4. 9:28Fragment backstack issue
  5. 13:01View lifecycle owner solution
  6. 14:28Three abstraction levels
  7. 17:17Simple app architecture
  8. 18:42Navigation and use cases
  9. 21:16Composition over inheritance
  10. 24:46Summary 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.