Lazy layouts in Compose
summary
Compose 1.2 provides LazyColumn/LazyRow/LazyVerticalGrid that render items on demand, with concrete advice: always provide unique keys and contentType for composition reuse, avoid nesting same-direction scrollables and 0-pixel items, and wrap frequent state reads in derivedStateOf. Grids support GridCells.Adaptive and custom spans; scrolling APIs are suspend functions (scrollToItem/animateScrollToItem) invoked via rememberCoroutineScope. Experimental LazyLayout lets teams implement staggered or custom lazy layouts, and built-in prefetching plus animateItemPlacement speed up visible-item transitions.
AI-written summary · about
chapters (7)
- 0:00Intro
- 0:11Lazy Lists
- 5:21Lazy Grids
- 10:42Lazy Layout
- 13:08Useful Tips
- 16:32Multiple Elements in One Item
- 18:34Custom Arrangements
related talks
37mPerformance in Compose:Lessons learned from Lazy layouts
32mThinking outside the Box: Custom Compose layouts
41mCreating a Custom Compose Layout, Step-By-Step
35mAdaptive Layouts in Compose
40mComposing Creatively with Custom Layouts
07mBasic Layouts in Compose
37mAdvanced Layout Animations in Compose
18mCompose: Implementing responsive UI for larger screens
