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.
No resources match these filters. Try another topic or clear the filters.
Skills
Repos that do the adapting for you: agent skills, libraries and samples on GitHub.
OpenHarmony’s sample collection includes a FoldableAdaptation project that switches ArkUI Navigation between stack and split modes. The example combines windowSizeChange breakpoints with route-stack changes, including separate handling for full-screen detail pages. This entry concerns the code/UI/FoldableAdaptation example within the much broader application-samples repository.
OpenHarmony’s Camera Kit guide explains how the available cameras can change when a device folds. It shows listening through CameraManager or display APIs, querying getSupportedCameras() again and selecting a camera that exists in the new state. Its ArkTS example coordinates XComponent recreation with camera switching to avoid leaving the previous preview on screen.
OpenHarmony’s FolderStack reference documents moving selected child components above the crease through upperItems, along with fold and hover callbacks. It records Stage-model and device constraints, automatic-rotation behavior and a warning that an if/else parent disables the hover capability. Per-interface API versions make those limits visible beside the usage contract.
The atomicService section of OpenHarmony’s module.json5 reference defines the resizeable option for adapting service windows when a foldable opens or closes. The option starts at API 20, defaults to false, and applies only when the app bundle type is atomicService. This is a narrowly scoped configuration requirement, not a replacement for adapting the actual layout.
OpenHarmony’s display reference documents fold status, display mode and crease-region APIs, with per-interface version requirements. It distinguishes foldStatusChange, which tracks physical folding, from foldDisplayModeChange, which follows the resulting display mode. The foldability notes also describe devices whose auxiliary outer screens are not available for application customization.
Huawei’s AppAnalyzer rule catalog describes layout, rotation and continuity checks for HarmonyOS foldables. Its opening/closing continuity rule looks for lost input, changed scroll or playback position and unexpected page changes. The UX table marks continuity and orientation checks as available from tool version 26.0.0 for listed API 20+ foldable phones and emulators. Older sections have separate version limits; these are checking criteria, not evidence that an app has passed them.
Huawei documents the DevEco Studio emulator controls for switching foldable devices between folded, expanded and hover states; hover mode displays the crease avoidance region. The table also maps tri-fold controls to fold-status values and marks additional Mate XT controls as available from 6.1.0 Beta2. This is a HarmonyOS tooling reference, with device-specific restrictions, rather than evidence that an app has passed adaptation tests.
Huawei’s HarmonyOS guide uses window-size changes and breakpoints to keep layouts continuous while a device folds, rotates or changes window mode. It distinguishes responsive resizing from posture-specific behavior and warns against relying only on fold-status events for layout. List examples use onScrollIndex() and scrollToIndex() to preserve the reader’s position after a fold.
Huawei’s versioned HarmonyOS V14 guide covers layouts and window behavior across folded, expanded and hover states. It shows how display.on('foldStatusChange') can drive posture-specific behavior, and how FolderStack or getCurrentFoldCreaseRegion() supports crease avoidance. Responsive layout and multi-window sections explain how to use additional screen space without stretching a phone layout.
Huawei’s HarmonyOS ArkUI reference documents FoldSplitContainer, a component for two- or three-region layouts across expanded, hover and folded states. It explains primary, secondary and optional extra builders, per-state layout options, and the window-width and posture conditions for hover behavior. Examples demonstrate configuring the regions while accounting for the crease.
Huawei’s HarmonyOS guide compares FolderStack, FoldSplitContainer and custom layouts for semi-folded use. It explains how to place media and controls above or below the crease, then shows a custom approach using fold-state listeners and getCurrentFoldCreaseRegion(). The comparison helps choose between built-in layouts and explicit posture or rotation policies.