Jetpack Compose: building a generic grid canvas

Patxi Bocos
4 min readApr 21, 2021

As promised in my last article, here I am back again with the grid canvas we used to replicate IntelliJ IDEA’s splash screen. This time I will be explaining how to implement some additional features.

Content alignment

We want our composable to have the ability to set where the cells will be placed relative to the canvas bounds, or how the space between the grid and the canvas limits will be distributed.

This can be easily achieved with Alignment interface which contains a single align

--

--

Patxi Bocos

Impure developer and functional programming enthusiast