Lifecycle, LiveData, ViewModels - The inner wiring
summary
Explains how Lifecycle, LiveData and ViewModel actually work: LiveData is a lifecycle‑aware data holder that doesn’t handle errors, Transformations.map and MediatorLiveData do the heavy lifting, and switchMap removes the previous source automatically so UI isn’t polluted by old searches. ViewModel is kept in a retained fragment and survives configuration changes but not process death. Fragments expose two lifecycles (fragment and view). Notes that ProcessLifecycleOwner uses a ContentProvider and adds a 700 ms pause so background/foreground events aren’t noisy.
AI-written summary · about
chapters (7)
- 0:00Intro
- 1:28Lifecycle
- 5:29Process Lifecycle
- 18:56Custom transformations
- 19:58LiveData vs RxJava
- 22:40ViewModel
- 24:29MVVM Architecture
related talks
23mLifecycle, LiveData, Viewmodels - The inner wiring
41mViewModels, LiveData and Lifecycles, oh my!
41mLiveData beyond VIewModels
33mThe A,B and C of Lifecycle Components
25mHow to Survive the Lifecicle
19mFun with LiveData
28mInternals of Android Architecture Components
27mAndroid Components under the hood
