FlexBox is an experimental Jetpack Compose container that lays out items in a single direction, dynamically resizing, wrapping, and aligning them to optimally fill the available space. We just launched new documentation for this feature last week:

https://developer.android.com/develop/ui/compose/layouts/adaptive/flexbox

#androidDev #JetpackCompose #FlexBox

FlexBox  |  Jetpack Compose  |  Android Developers

This document provides an introduction to FlexBox in Jetpack Compose, a flexible layout container inspired by CSS.

Android Developers

To demonstrate how the various new FlexBox properties affect layout behavior, I created a little visualizer experiment: https://sanbeiji.com/experiments/flexbox/android/

Try adding items, messing around with the property values, etc., to see how things change! Example code changes appear at the bottom.

Compose FlexBox Visualizer