~/talk

Creating a Custom Compose Layout, Step-By-Step

Talkat droidcon London 2024 · 2024-10-31..11-01· [android, frontend-architecture]
slides:none on file

Step‑by‑step builds a schedule UI with a layout composable that measures sessions by duration, uses constraints and placeables to position items, and applies intrinsics to premeasure heights so a single pass works. Implements a custom modifier.node for per-item time ranges, swaps scroll offsets for a viewport as single source of truth to coordinate scrolling across multiple tracks, shows far fewer recompositions via phase state reads, and demos look‑ahead animations — a working, performant custom layout that solves overlapping and synced scrolling.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Compose phases in depth
  3. 3:31Custom layouts vs Row for schedules
  4. 8:02Performance with Layout Inspector
  5. 12:35Custom layout from scratch
  6. 14:22Measuring and placing elements
  7. 18:35Height constraints with intrinsics
  8. 20:43Overlapping data in schedules
  9. 23:51Scroll state versus viewport
  10. 26:40Custom scopes and modifiers
  11. 31:13Modifier.Node API
  12. 33:22Remembering schedule scope
  13. 36:10Scrolling across tracks
  14. 38:55Performance with phase state
  15. 39:39Animations with LookaheadScope
  16. 40:42Custom layouts in Compose
~/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.