Kit · HarmonyOS / OpenHarmony

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.

Sample中文

OpenHarmony application samples

openharmony/applications_app_samples · OpenHarmony · ★ 8

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.

  • #adaptive-layout
  • #two-pane
  • #arkui
View the repo →

Articles

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

Article中文

Adapting Camera Changes in Different Fold States (ArkTS)

OpenHarmony Documentation · OpenHarmony

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.

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

FolderStack

OpenHarmony Documentation · OpenHarmony

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.

  • #postures
  • #hinge-avoidance
  • #arkui
Read the original →
Article中文

module.json5 configuration file

OpenHarmony Documentation · OpenHarmony

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.

  • #adaptive-layout
  • #arkui
Read the original →
Article中文

@ohos.display (Screen Properties)

OpenHarmony Documentation · OpenHarmony

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.

  • #fold-state
  • #postures
  • #hinge-avoidance
  • #arkui
Read the original →
Article中文

Rules overview

Huawei Developer · Huawei

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.

  • #testing
  • #continuity
  • #adaptive-layout
  • #design
Read the original →
Article中文

Using the toolbar

Huawei Developer · Huawei

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.

  • #testing
  • #postures
  • #fold-state
  • #hinge-avoidance
Read the original →
Article中文

Adapting to Screen Differences Across Devices

Huawei HarmonyOS Developers · Huawei

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.

  • #continuity
  • #adaptive-layout
  • #multi-window
  • #arkui
Read the original →
Article中文

Foldable development practices

Huawei HarmonyOS Developers · Huawei

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.

  • #adaptive-layout
  • #fold-state
  • #hinge-avoidance
  • #multi-window
  • #arkui
Read the original →
Article中文

FoldSplitContainer

Huawei HarmonyOS Developers · Huawei

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.

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

Semi-Folded State of Foldable Screens

Huawei HarmonyOS Developers · Huawei

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.

  • #postures
  • #hinge-avoidance
  • #media
  • #arkui
Read the original →