0Pricing
Jetpack Compose Academy · Lesson

Constraints & Intrinsic Measurements

Negotiate size between parent and child.

Constraints Are a Size Contract

A parent passes constraints to each child: the allowed min and max width and height. The child must choose a size that fits inside them. 📏

Four Numbers Define the Box

Every Constraints object holds minWidth, maxWidth, minHeight, and maxHeight. Together they describe the range of sizes a child may pick.

constraints.minWidth
constraints.maxWidth
constraints.maxHeight

All lessons in this course

  1. The Measure & Place Model
  2. Writing a Layout Composable
  3. Constraints & Intrinsic Measurements
  4. A FlowRow That Wraps Chips
← Back to Jetpack Compose Academy