Chaining Jetpack Compose modifiers beyond intuition
summary
Demonstrates that modifier order changes measured size, placement and hit area by altering constraints and the layout pass: swapping size and padding produces different measured rectangles, multiple size modifiers often do nothing, and a requiredSize still sits inside a parent that fills max size; swapping scale and offset changes whether the translation is scaled; a custom gradient plus clip only works when clip precedes the gradient; conclusion: treat size modifiers in layout phase and graphics modifiers in drawing phase differently.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 1:27Modifier chaining intuition
- 7:59Layout phase and constraints
- 17:58Constraints vs modifiers
- 23:21Order matters summary
related talks
37mUnderstanding Compose modifiers and how their order affects UI
38mDesigning scalable Compose APIs
38mComprehensive Guide to Jetpack Compose Modifiers
40mComposing Creatively with Custom Layouts
36mNever Be Confused Again! A Practical Guide to Writing Jetpack Compose
35mAdaptive Layouts in Compose
21mCompose Modifiers deep dive
36mJetpack Compose: Drawing without pain and recomposition
