~/talk

Lazy layouts in Compose

Talkat Google I/O 2022 · 2022-05-11..05-12· [android]
links:none on file
links:none on file
links:none on file
slides:none on file

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

  1. 0:00Intro
  2. 0:11Lazy Lists
  3. 5:21Lazy Grids
  4. 10:42Lazy Layout
  5. 13:08Useful Tips
  6. 16:32Multiple Elements in One Item
  7. 18:34Custom Arrangements
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.