~/talk

Fun with LiveData

Talkat Android Dev Summit 2018 · 2018-11-07..11-08· [android]
slides:none on file

LiveData is lifecycle-aware and a single-value holder that delivers only the latest value to active observers, not a stream, so use it for UI state but not for event streams or large JSON blobs. It demonstrates concrete tools: map, switchMap and MediatorLiveData, and a custom aggregate (a totalLength mediator implemented in about four lines of code) that sums multiple LiveData strings. Beware sharing a singleton LiveData across activities (causes visible flash during transitions). For heavy reactive chains or one‑shot work prefer RxJava or coroutines; samples and a GitHub browser / I/O app are provided.

AI-written summary · about

  1. 0:00Introduction to LiveData
  2. 2:00Lifecycle awareness
  3. 3:55Data holder property
  4. 5:27Transformations with Map
  5. 7:58Switch Map and custom logic
  6. 9:36Customizing LiveData
  7. 12:02Common mistakes and patterns
  8. 14:00Correct wiring patterns
  9. 16:50When not to use LiveData
~/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.