Analysis updated 2026-06-21
Build an Android screen where items wrap onto new rows automatically, like a CSS flexbox grid.
Display a long scrollable list of tags or chips in a RecyclerView that wraps to new lines without running out of memory.
Replace a rigid Android LinearLayout with a flexible container that sizes items based on available space.
| google/flexbox-layout | square/picasso | android/sunflower | |
|---|---|---|---|
| Stars | 18,337 | 18,833 | 17,786 |
| Language | Kotlin | Kotlin | Kotlin |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 1/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Add the library as a Gradle dependency, requires an existing Android project set up in Android Studio.
FlexboxLayout is a Kotlin/Java library for Android that brings the flexible box layout model, a system originally from web CSS, to Android applications. Flexbox is a way to arrange items in a container so that they can grow, shrink, and wrap onto new lines in a controlled way, making it easier to build responsive layouts without hard-coding exact positions. The library provides two ways to use it. The first is FlexboxLayout, a view container that works like Android's built-in LinearLayout or RelativeLayout, where you define the layout in XML or code and items are arranged at once. The second is FlexboxLayoutManager, which is designed to work inside a RecyclerView, Android's component for displaying long scrollable lists. Using FlexboxLayoutManager has the advantage of recycling off-screen views for reuse as the user scrolls, which uses significantly less memory when displaying many items. Both approaches support the main flexbox attributes such as controlling the direction items flow, whether items wrap to new lines, how items are aligned along both axes, and how individual items can grow or shrink relative to their siblings. The library is installed as a dependency via a build configuration file.
An Android library that brings the web's flexible box layout system to Android apps, letting items grow, shrink, and wrap onto new lines without hard-coding positions.
Mainly Kotlin. The stack also includes Kotlin, Java, Android.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.