> Documentation index: https://developer.android.com/develop/llms.txt

### Adaptive layout samples

[![](http://developer.android.com/static/develop/adaptive-apps/samples/images/flexbox-sample.png)](https://github.com/android/adaptive-apps-samples/tree/main/FlexBox) Compose Layout

### [FlexBox](https://github.com/android/adaptive-apps-samples/tree/main/FlexBox)

The FlexBox sample app showcases the FlexBox layout. The app demonstrates column and row directions, flex item sizing (basis, grow, and shrink), wrapping behavior, and alignment configurations. [Get the code](https://github.com/android/adaptive-apps-samples/tree/main/FlexBox) [Learn more](http://developer.android.com/develop/adaptive-apps/guides/flexbox.md.txt) [![](http://developer.android.com/static/develop/adaptive-apps/samples/images/grid-sample.png)](https://github.com/android/adaptive-apps-samples/tree/main/Grid) Compose Layout

### [Grid](https://github.com/android/adaptive-apps-samples/tree/main/Grid)

The Grid sample app illustrates how to configure grid columns and rows, and how to span items across multiple rows and columns using grid modifiers in Compose. [Get the code](https://github.com/android/adaptive-apps-samples/tree/main/Grid) [Learn more](http://developer.android.com/develop/adaptive-apps/guides/grid.md.txt) [![](http://developer.android.com/static/develop/adaptive-apps/samples/images/mediaquery-sample.png)](https://github.com/android/adaptive-apps-samples/tree/main/MediaQuery) Compose Adaptive

### [MediaQuery](https://github.com/android/adaptive-apps-samples/tree/main/MediaQuery)

MediaQuery is a sample app exploring the Media Query APIs in Compose UI. The sample demonstrates adapting layout and UI elements based on window dimensions, device posture (such as tabletop mode), input hardware (keyboards and pointer precision), hardware sensors, and viewing distance. [Get the code](https://github.com/android/adaptive-apps-samples/tree/main/MediaQuery) [Learn more](http://developer.android.com/develop/adaptive-apps/guides/mediaquery.md.txt)