0PricingLogin
Jetpack Compose Academy · Lesson

Adaptive vs Fixed Grid Cells

Make grids responsive to screen width.

Two Ways to Size Cells

A grid needs to know how wide its columns are. Compose offers two strategies: Fixed column counts and Adaptive minimum widths. 📐

Fixed Recap

You already met GridCells.Fixed(n). It always shows n columns, so cells grow or shrink to fit the screen width.

columns = GridCells.Fixed(3)

All lessons in this course

  1. LazyVerticalGrid Galleries
  2. LazyRow for Carousels
  3. Adaptive vs Fixed Grid Cells
  4. Scroll State & Programmatic Scrolling
← Back to Jetpack Compose Academy