On the road to Jetpack Compose
summary
Jetpack Compose is a Kotlin declarative UI toolkit, open sourced at I/O and currently in alpha, that maps observable state to UI and performs fine-grained recomposition so only affected nodes update. The demo builds a shopping cart using remember mutableStateOf for local state and converts ViewModel LiveData with observeAsState so state hoisting preserves unidirectional data flow. Android Studio offers interactive previews, Compose interops with existing XML via ComposeView and MDC theme adapter, and migration of the Sunflower sample shows incrementally replacing layouts — APIs still change, and animations may trigger frame‑by‑frame recomposition.
AI-written summary · about
chapters (14)
- 0:00Welcome and introduction
- 0:56What is Jetpack Compose
- 3:03Compose timeline and state
- 4:08First Compose code demo
- 5:58Shopping cart state demo
- 8:47Understanding state in Compose
- 10:55Unidirectional data flow
- 16:28State hoisting concept
- 23:47What is composition
- 25:53Recomposition explained
- 31:54Local vs hoisted state
- 41:02Migrating to Compose
- 46:47Compose adoption summary
- 47:58Q&A session
