Peeling Back the Layers: Unmasking the UI-nknown!
summary
Concrete guidance: expose screen UI as an observable holder such as StateFlow or Compose state (or LiveData) and convert external Flows with stateIn using whileSubscribed(5000) to avoid wasted work; keep business logic in a screen-scoped ViewModel using viewModelScope so operations survive configuration changes; collect state lifecycle-aware with APIs like collectAsStateWithLifecycle / repeatOnLifecycle; use SavedState for transient process-death survival and persistent storage (Room) for long-term data.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 3:17Understanding the UI layer
- 10:18Modeling UI state
- 17:41State holders explained
- 27:29Plain class state holders
- 32:47Hoisting state correctly
- 34:53Saving UI state
- 36:18Q&A and closing
related talks
21mState holders and state production in the UI Layer
45mImplementing Modern Android Architecture
38mArchitecture Agnostic UI Development
43mHelp! ViewModel
34mArchitectures in the Compose World
41mLiveData beyond VIewModels
41mViewModels, LiveData and Lifecycles, oh my!
49mDevelop Your App with Lots of "Flow"
