🚲 Aidan Pieper

Jetpack Compose Arrangement: A Visual Guide

One of my favorite blog posts is Amanda Hill’s Android ImageView ScaleType: A Visual Guide. For some reason, I can never remember Android’s different image scaling modes and a visual reference guide really works for me.

This post takes inspiration from Amanda and does the same thing but for Jetpack Compose’s Arrangement property.1

↔️ Row

SpaceEvenly 1 SpaceBetween1 SpaceAround 1

↕️ Column

SpaceEvenly SpaceBetween SpaceAround
1 1 1

Descriptions

SpaceEvenly

Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child. Visually: #1#2#3# for LTR and #3#2#1# for RTL.

SpaceBetween

Place children such that they are spaced evenly across the main axis, without free space before the first child or after the last child. Visually: 1##2##3 for LTR or 3##2##1 for RTL.

SpaceAround

Place children such that they are spaced evenly across the main axis, including free space before the first child and after the last child, but half the amount of space existing otherwise between two consecutive children. Visually: #1##2##3# for LTR and #3##2##1# for RTL


  1. For now, this post excludes the arrangements Top/Bottom, Start/End, and Center because I deem those are relatively straight forward to internally visualize. 😀 ↩︎

#android #jetpack compose