Kit · Android

The best foldable adaptation know-how from around the web. Each entry is a short summary in our words with a link to the original, so the credit stays with the author.

Skills

Repos that do the adapting for you: agent skills, libraries and samples on GitHub.

Library

Android Jetpack

androidx/androidx · Android Open Source Project · ★ 6.1K

The AndroidX repository contains the Compose Material 3 Adaptive libraries used to arrange content across changing window sizes on foldables. Its list-detail scaffold supports one, two or three panes, with optional pane expansion, while Navigation 3 integration maps navigation entries into those panes. This entry concerns the compose/material3/adaptive modules within the wider Jetpack repository.

  • #compose
  • #adaptive-layout
  • #two-pane
  • #hinge-avoidance
View the repo →
Sample

Adaptive apps samples

android/adaptive-apps-samples · Google · ★ 79

Google’s Android sample projects include list-detail, feed and supporting-pane layouts in Compose and Views for phones, tablets and foldables. The repository also contains adaptive media and navigation examples for comparing implementation patterns as screen space changes. Start with the CanonicalLayouts directory for side-by-side content.

  • #adaptive-layout
  • #two-pane
  • #compose
  • #android-views
  • #media
View the repo →
Agent skill

Android skills

android/skills · Google · ★ 11K

Google’s Android agent-skill collection includes a dedicated adaptive UI workflow for Compose apps. The adaptive skill covers multi-pane layouts, preserving UI and media state through folding or resizing, and tabletop layouts for foldable devices. It assumes Compose screens and Navigation 3, so those prerequisites should be checked before applying the instructions.

  • #adaptive-layout
  • #two-pane
  • #continuity
  • #postures
  • #compose
View the repo →

Articles

Write-ups, docs and talks on how other developers solved it.

Article

Adaptive app quality guidelines

Android Developers · Google

Google’s adaptive quality framework distinguishes basic full-window support, optimized layouts and experiences that use device-specific features. Its checklists cover foldable postures, multitasking and external input, with linked tests and a device matrix. Developers can select the requirements that apply to their app rather than treating every guideline as universal.

  • #testing
  • #design
  • #input
  • #postures
  • #multi-window
Read the original →
Article

Dimensions

React Native Docs · React Native

React Native’s Dimensions reference explicitly warns that folding can change window and screen size after startup. It recommends useWindowDimensions for React components, or a change listener where Dimensions is needed, so rendering does not keep stale cached values. This covers resizing inputs rather than hinge geometry or device-specific fold APIs.

  • #react-native
  • #adaptive-layout
Read the original →
Article

displayFeatures property

Flutter API · Flutter

Flutter’s MediaQueryData reference explains how display features describe hinges, creases and cutouts in the coordinate space spanning the active screens. Feature type distinguishes an obstruction from a fold, while feature state exposes posture. The documentation explicitly limits this populated list to Android, so this entry does not imply equivalent iOS or HarmonyOS behavior.

  • #flutter
  • #fold-state
  • #postures
  • #hinge-avoidance
Read the original →
Article

DisplayFeatureSubScreen class

Flutter API · Flutter

Flutter’s DisplayFeatureSubScreen places content in a sub-screen that avoids an obstructing display feature or half-open fold. It chooses the region nearest anchorPoint, with a Directionality fallback, and adjusts the child’s MediaQuery coordinates and padding. This complements the existing display-feature reference; hardware feature data is currently populated on Android.

  • #flutter
  • #hinge-avoidance
  • #postures
  • #adaptive-layout
Read the original →
Article

Foldable devices and cameras

Android Developers · Google

Google’s Camera2 guide explains how folding can change the active physical sensor behind a logical camera, including its orientation and lens facing. It recommends monitoring the active physical ID and re-reading camera characteristics instead of caching them, then updating preview transforms when the sensor changes. CameraX remains the suggested default when low-level Camera2 control is unnecessary.

  • #media
  • #fold-state
  • #continuity
Read the original →
Article

Foldables

Android Developers · Google

This foldable-specific quality checklist pairs posture, camera and multitasking requirements with named tests. It covers controller placement in tabletop mode, front and back camera previews, picture-in-picture, attachments and multiple app instances. The detailed scenarios complement the broader adaptive-quality tiers already in the Kit.

  • #testing
  • #postures
  • #multi-window
  • #media
Read the original →
Article

List state management

Android Developers · Google

Google’s Compose recipe explains how folding or resizing can disrupt scroll position and the state of individual list items. It uses rememberLazyListState() for list position and rememberSaveable for stateful elements such as text inputs. The example separates list-level state from item-level state so an unfolding transition can preserve both.

  • #continuity
  • #input
  • #compose
Read the original →
Article

Support multi-window mode

Android Developers · Google

Google explains window bounds, lifecycle callbacks and access to shared resources when apps run alongside one another. Its multi-instance section specifically describes how folding a device can background or terminate one of two app instances. WindowMetrics, multi-window callbacks and the verification checklist help separate resizing behavior from single-window pane layouts.

  • #multi-window
  • #continuity
  • #media
  • #android-views
Read the original →
Article

Build a list-detail layout with activity embedding and Material Design

Android Developers · Google

This codelab adapts a legacy multi-activity app to a two-pane layout using XML rules or Jetpack WindowManager APIs. It then uses SplitController and a split attributes calculator to respond to changes in window or device state, including folding and tabletop posture. The walkthrough also switches between a navigation rail and bottom navigation as the available space changes.

  • #two-pane
  • #adaptive-layout
  • #postures
  • #android-views
Read the original →
Article

Foldable Postures and orientation

Android Developers · Google

Google explains how folded, flat and tabletop postures affect the arrangement of content and controls. The hinge guidance recommends considering where text and controls sit and allowing a wider gutter in pane-based layouts. Cover-screen and orientation examples help designers adapt a focused experience without assuming that every foldable supports every posture.

  • #design
  • #postures
  • #hinge-avoidance
  • #two-pane
Read the original →
Article

Make your app fold aware

Android Developers · Google

Google’s official guide to reading fold state with Jetpack WindowManager. It shows how to get a FoldingFeature, tell whether the device is flat or half-opened, and check whether the hinge splits the window. From there you can design for tabletop (half-open, hinge horizontal) and book (half-open, hinge vertical) postures instead of letting content fall into the crease.

  • #jetpack-windowmanager
  • #postures
  • #compose
Read the original →
Article

Test different screen and window sizes

Android Developers · Google

This guide separates visual layout checks from state-restoration tests when a foldable changes size or configuration. It explains using StateRestorationTester or Activity.recreate() to exercise restoration, and distinguishes those checks from posture-specific tests that need a suitable foldable device or emulator. It also covers UI behavior and screenshot tests for layout regressions.

  • #testing
  • #continuity
  • #adaptive-layout
  • #compose
Read the original →