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
WindowInsetsCompatwith 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
@Previewspec, window size classes, an Android Studio hardware profile andadbemulator commands. - Android details & sources (collapsed): system bar and cutout insets, the separate
statusBars,navigationBars, gesture andtappableElementinsets, a Test fixture with a ready-madeWindowInsetsCompat, 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
WindowSizeClassof every captured screen and rotation, with theFoldingFeatureeach capture reported. - An Android Studio hardware profile for Galaxy devices, and
adbcommands 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 gestureprints a device's insets per screen. Add--unit px,--screen coveror--jsonas needed.npx windowinsets-info list --series foldlists devices and their measurement status.npx windowinsets-info fixtures --series fold > insets.jsonwrites every measured screen and navigation mode as compact JSON for screenshot and layout tests.npx windowinsets-info preview s26-ultra --nav gestureprints a Compose@Previewspec for every captured screen and rotation;sizeclasslists 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.