hmos-multidevice-fold-state

Validate and route HarmonyOS foldable-device adaptation tasks across fold states and crease geometry.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill hmos-multidevice-fold-state
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hmos-multidevice-fold-state
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/harmonyos-ai-agent-skill/references/hmos-multidevice-fold-state
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill hmos-multidevice-fold-state

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This skill helps you validate and route HarmonyOS foldable-device UI adaptation tasks so that layouts remain correct across fold/hover states, fold-crease avoidance, multi-fold form factors (F/M/G), and special-ratio inner/outer screen differences without breaking existing UI state machines.

Core Features & Use Cases

  • Fold state routing and scene selection: Determines the correct adaptation scene based on FoldStatus, fold display modes, hover state, crease geometry, and multi-fold mappings.
  • Crease avoidance with coordinate-safety: Anchors split boundaries to the real crease rectangle (not to midlines or fixed offsets), and applies safe content margins (16 vp / 40 vp) only within partitions.
  • Fold continuity issue remediation: Provides a general repair path to prevent step increase, scroll/input drift, media playback progress jumps, and lifecycle listener leaks after fold/unfold transitions.

Use cases: fixing “hover layout cut by crease”, correcting direction/partition reversals on fixed-vertical hinge devices, and restoring reliable UI behavior after folding/unfolding real video/detail pages.

Quick Start

Ask the AI to use hmos-multidevice-fold-state to analyze your HarmonyOS foldable page (FoldStatus + hover state + crease region data) and produce a structured REQ/DEV/FIX/VAL plan with verification evidence requirements.

Frequently Asked Questions about hmos-multidevice-fold-state

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix HarmonyOS foldable UI layout cut by the crease in hover state?

To fix foldable UI crease cutting in hover state, anchor split boundaries to the real crease rectangle in a single coordinate space rather than midlines or fixed offsets. Apply safe content margins of 16 vp or 40 vp strictly within partitions to prevent visual overlap.

Why does scroll or media playback progress drift after folding or unfolding a HarmonyOS device?

Fold continuity regressions like scroll drift, input jumps, and media progress leaps occur when UI state machines break during FoldStatus transitions. Remediate by applying general repair paths to prevent step increases and lifecycle listener leaks after fold/unfold state changes.

How do I handle multi-fold form factor mappings for HarmonyOS foldable devices?

Handle multi-fold form factor mappings by validating adaptation tasks across F, M, and G form factors using declarative intent and applies-when rules. Route scenes based on FoldStatus, fold display modes, hover state, and crease geometry to ensure correct layout refresh.

How to validate direction and partition alignment on fixed-vertical hinge HarmonyOS devices?

Validate direction and partition alignment by applying strict partition boundary anchoring to real crease regions within a single coordinate space. Correct semantic alignment reversals by routing scenes through FoldStatus-driven layout refresh and hinge geometry partitioning.

Do I need to provide crease geometry data to adapt HarmonyOS foldable layouts?

Yes, you need to provide FoldStatus, hover state, and crease region data to analyze foldable pages. The skill uses this input to produce a structured REQ/DEV/FIX/VAL plan with verification matrices and evidence requirements for adaptation tasks.

What are the limitations of using midline offsets for foldable crease avoidance?

Midline or fixed offsets fail crease avoidance because they do not anchor to the real crease rectangle, causing layout misalignment across fold/hover states. Strict partition boundary anchoring to actual crease regions in a single coordinate space is required for stable UI.