Deep Dive into New Jetpack Compose APIs: FlexBox, Grid, Styles, Adaptive UI with mediaQuery
summary
Jetpack Compose introduces four new APIs — mediaQuery, FlexBox, Grid, and Styles — to build adaptive UIs by detecting media state (window size, posture, input devices), defining reusable grid configurations/areas, and bundling dynamic style tokens. The Adaptive JetStream sample was rewritten using these APIs, halving layout-decision code and simplifying tests; note that FlexBox and Grid lack lazy-loading, so use LazyRow or LazyVerticalGrid for large lists, and Grid can swap layout configs via lambdas without changing content.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:14New Jetpack Compose API background
- 4:27What is media state
- 8:17Adaptive UI UX consistency
- 12:35New API goals overview
- 14:45Media query API
- 20:47FlexBox and Grid API
- 27:50Styles API dynamic styling
- 33:26Implementation effects and component choice
- 35:54Migration strategy
- 37:19Resources and future outlook
related talks
35mBuild adaptive apps with Compose's new APIs
35mBuild adaptive apps with Compose's new APIs
31mDesigning Media Friendly Jetpack Compose Components
23mBuild Custom Design Systems with Jetpack Compose's New Styles API
18mCompose: Implementing responsive UI for larger screens
44mUnleashing the Power of Jetpack Compose: Revolutionizing Android UI Development
41mCompose by Example
35mNext Generation Android UI with Jetpack Compose
