Digging Deeper with Subcomposition + Custom Compose Layouts
summary
Explains when to replace rows/columns with a custom layout to move heavy math from composition into the measure phase, showing a timeline demo that drops from about 300 compositions to near-zero recompositions measured in Layout Inspector; demonstrates how cyclical phase dependencies break Paparazzi screenshots and previews and how boxWithConstraints or subcomposeLayout solves it by composing and measuring a bottom bar first, then composing content with an injected padding parameter so the layout renders correctly in one frame.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:07Composition layout drawing phases
- 3:15State hygiene phase reads
- 5:00Custom layouts Layout composable
- 7:52Performance benefits custom layouts
- 12:47Custom layouts complex UI
- 16:38Cyclical phase dependencies recomposition
- 20:54Nested layouts performance impact
- 23:00Tooling productivity consequences
- 25:06Single source layout truth
- 27:56Avoiding phase dependencies BoxWithConstraints
- 30:01Subcomposition in Compose
- 33:11Viewer component example
- 36:22How SubcomposeLayout works
- 39:54SubcomposeLayout benefits dynamic state
- 41:46SubcomposeLayout vs custom layout
- 42:49Software dynamic dance
related talks
40mDigging Deeper with Subcomposition + Custom Compose Layouts
32mThinking outside the Box: Custom Compose layouts
41mCreating a Custom Compose Layout, Step-By-Step
42mCreating a Custom Compose Layout, Step-by-Step
35mAdaptive Layouts in Compose
40mComposing Creatively with Custom Layouts
37mAdvanced Layout Animations in Compose
18mCompose: Implementing responsive UI for larger screens
