Blog Infos
Author
Published
Topics
, , , ,
Published

After three years of writing Compose code, I still find myself frequently Googling “how to center items in Row/Column/Box” because I haven’t memorized all the permutations of arrangement and alignment parameters. I finally made a visual cheat sheet for this. Hope it’s helpful for anyone else who spends too much time Googling or asking AI how to center things!

These tables are also available in my android-cheatsheet repo, where I collect visual guides for Android development.

Job Offers

Job Offers

There are currently no vacancies.

OUR VIDEO RECOMMENDATION

, ,

Kobweb:Creating websites in Kotlin leveraging Compose HTML

Kobweb is a Kotlin web framework that aims to make web development enjoyable by building on top of Compose HTML and drawing inspiration from Jetpack Compose.
Watch Video

Kobweb:Creating websites in Kotlin leveraging Compose HTML

David Herman
Ex-Googler, author of Kobweb

Kobweb:Creating websites in Kotlin leveraging Compose HTML

David Herman
Ex-Googler, author o ...

Kobweb:Creating websites in Kotlin leveraging Compose HTML

David Herman
Ex-Googler, author of Kob ...

Jobs

No results found.

A rule of thumb is that Arrangement parameters specify the placement of children in the main axis direction (eg. horizontalArrangement for Row and verticalArrangement for Column), whereas the Alignment parameters specify their placement in the cross axis direction (eg. verticalAlignment for Row and horizontalAlignment for Column)

This post isn’t intended to go into technical details, so here are some articles that do:

Happy New Year! May we all spend less time Googling “how to center items” in 2025! 🥂

This article is previously published on proandroiddev.com.

YOU MAY BE INTERESTED IN

YOU MAY BE INTERESTED IN

blog
It’s one of the common UX across apps to provide swipe to dismiss so…
READ MORE
blog
In this part of our series on introducing Jetpack Compose into an existing project,…
READ MORE
blog
In the world of Jetpack Compose, where designing reusable and customizable UI components is…
READ MORE
blog
Hi, today I come to you with a quick tip on how to update…
READ MORE
Menu