windowinsets.info

Developer guide

Using windowinsets.info in your code

This site's measured values (from real devices or Samsung RTL) show what Android actually returns on that model and OS version. Use them to:

  • Test layouts locally: Each device's Metrics panel has a collapsed Test fixture block: a WindowInsetsCompat with the capture's exact px for every inset type, ready to dispatch to the view under test in Robolectric, Paparazzi or Roborazzi.
  • Debug device-specific issues: If your app behaves differently on a Galaxy S25+ vs another device, check the inset values here.
  • Document assumptions: Link to the inset data when filing bugs or PRs, so your team knows which device/OS you measured on.

All values are linked to their source (official specs, raw probe JSON, or community reports), so you can always trace where a number came from.

What's in the Metrics panel

Everything follows the selected screen, rotation, navigation mode and unit. From top to bottom:

  • Markdown, JSON and Export JSON: the whole device as a readable reference, a shareable data URL or a download (see below).
  • Dimensions, Safe Area Insets, Display Cutout Bounds and Corner Radii: the values drawn on the diagram.
  • Use in development (collapsed): a copyable Compose @Preview spec, window size classes, an Android Studio hardware profile and adb emulator commands.
  • Android details & sources (collapsed): system bar and cutout insets, the separate statusBars, navigationBars, gesture and tappableElement insets, a Test fixture with a ready-made WindowInsetsCompat, the One UI or emulator version, and links to every raw capture.
  • App Preview (inside the same section, when App insets is set to Ignored or Applied): copyable Compose and View padding code for the selected screen.

Sharing a specific view

A device page's URL follows its controls, so you can paste it into an issue or PR as-is. For example, /galaxy-z-fold7?nav=gesture&rotate=90&hinge=180&unit=px opens the inner display in gesture navigation, turned clockwise, in pixels. Supported keys are nav (gesture, 3-button), rotate (clockwise degrees), hinge (0–180, foldables), unit (dp, px) and app (ignored, applied). Defaults are left out of the URL.

Exporting a complete device

Choose Export JSON at the top of a device's Metrics panel to download every registered screen and both Android navigation modes. The versioned export keeps raw dp and px separate, labels safe-area calculations as derived, includes capture conditions and sources, and leaves unmeasured values explicitly pending. Each measurement also splits systemBars into statusBars and navigationBars, and adds systemGestures, mandatorySystemGestures and tappableElement, all read from the raw InsetsProbe capture it cites (null when that capture cannot be resolved).

Choose Markdown to open the same values as a readable reference at https://windowinsets.info/<device-slug>.md: one table per screen, rotation and navigation mode, with the raw capture behind each. It is convenient to paste into an issue or give to an AI assistant.

Choose JSON to open a shareable URL. Scripts can fetch the same data at https://windowinsets.info/data/<device-slug>.json.

To discover devices, fetch https://windowinsets.info/data/index.json. It lists every public device with its measurement status (complete, partial or pending), the navigation modes and rotations captured per screen, and the URL of its full export. For bulk use, https://windowinsets.info/data/all.json holds every device export in one file.

Previewing a device in Android Studio

Open Use in development near the bottom of a device's Metrics panel. It follows the selected screen, rotation and navigation mode, and reads everything from the raw capture behind that view:

  • A Compose @Preview(device = "spec:…") with the capture's exact pixel size and density. Choose Copy and paste it above a composable.
  • The WindowSizeClass of every captured screen and rotation, with the FoldingFeature each capture reported.
  • An Android Studio hardware profile for Galaxy devices, and adb commands that set a running emulator to the same window size and density.

Compose Preview and the emulator draw their own generic system bars and cutout, not One UI's, so check layouts against the measured insets. Rotations without a capture read "not measured yet".

From the command line

The windowinsets-info CLI reads the same data with no install (Node.js 18.3 or later):

  • npx windowinsets-info get s26-ultra --nav gesture prints a device's insets per screen. Add --unit px, --screen cover or --json as needed.
  • npx windowinsets-info list --series fold lists devices and their measurement status.
  • npx windowinsets-info fixtures --series fold > insets.json writes every measured screen and navigation mode as compact JSON for screenshot and layout tests.
  • npx windowinsets-info preview s26-ultra --nav gesture prints a Compose @Preview spec for every captured screen and rotation; sizeclass lists their window size classes.

Unmeasured modes print "not measured yet" and are left out of fixtures; nothing is estimated. AI tools can start from /llms.txt.

Found an issue or want to contribute?

Open an issue or pull request on GitHub. If you have a device and want to add insets data, use InsetsProbe and share your JSON.