# adaptive

> Claude/Codex skill by [@android](https://omgskills.com/library/android/index.md) · 9.9k stars · Updated 2026-10-26

Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto, and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API, and how to preserve UI, navigation, scroll, and media playback state across configuration changes (such as folding/unfolding a foldable, rotating a device, or resizing a window). It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as buttons) with varying target sizes, and adaptive layouts (including navigation areas - nav rails and nav bars) using the Compose Grid and FlexBox APIs. It also covers desktop experiences with keyboard shortcuts, tooltips and custom cursors.

Tags: skills

## Install

```sh
git clone https://github.com/android/skills /tmp/skills && ln -s /tmp/skills/jetpack-compose/adaptive ~/.claude/skills/adaptive
```

## From README

Prerequisites The app must: Use Compose for all screens. If it's still using Fragments or Views, suggest using the XML to Compose skill to migrate those screens. Use Jetpack Navigation 3. If it doesn't, suggest the Navigation 3 skill to migrate the app. Workflow to make an app adaptive To make an app adaptive, follow these steps or a subset of them adapting to the task. Step 1: Verify current UI Step 2: Make the navigation bar adaptive Step 3: Add multi-pane layouts Step 4: Make vertical lists adaptive by changing the number of columns Step 5: Hide app bars when scrolling Step 6: Preserve UI state across configuration changes Step 7: Add desktop experiences Step 8: Support foldable devices Step 1. Verify current UI Ensure that screenshot tests exist to verify the current UI on different form factors. If they don't exist, add the \[Compose Preview Screenshot Testing tool\](references/android/studio/preview/compose-screenshot-testing-with-testsuites.md).

## Links

- HTML page: https://omgskills.com/library/android/skills/adaptive/
- GitHub: https://github.com/android/skills
- Author: [@android](https://omgskills.com/library/android/index.md)

## More from this repo

- [android-cli](https://omgskills.com/library/android/skills/android-cli/index.md) — Provides instructions for installing and using the \`android\` CLI.
   - [@android](https://omgskills.com/library/android/index.md) · 10k stars
- [android-intent-security](https://omgskills.com/library/android/skills/android-intent-security/index.md) — Best practices for Android Intent security.
   - [@android](https://omgskills.com/library/android/index.md) · 10k stars
- [navigation-3](https://omgskills.com/library/android/skills/navigation-3/index.md) — Learn how to install and migrate to Jetpack Navigation 3, and how to implement features and patterns such as deep...
   - [@android](https://omgskills.com/library/android/index.md) · 10k stars
