hmos-multidevice-natural-orientation

Official

稳定适配自然方向与屏幕旋转策略

Authoropenharmonyinsight
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves inconsistent orientation behavior on HarmonyOS multi-device scenarios by correctly separating screen rotation, display orientation, window orientation, and natural orientation, then applying the right rotation strategy with lifecycle-safe updates.

Core Features & Use Cases

  • Natural orientation & rotation semantics: Establishes the correct mapping between natural portrait/landscape states and the meaning of rotation values, including special handling for tri-fold G-state.
  • Window-safe orientation control: Applies rotation changes only via the main window using setPreferredOrientation(), with clear boundaries for where it must not be used.
  • Multi-device adaptation & bug repair: Provides scene-based guidance for multi-form-factor adaptations and for common direction bugs (Tabs/Swiper lock issues, foldable forced portrait, split/suspended window failures, video full-screen restore issues).

Use Case: Your app’s video page and short-video feed intermittently end up in the wrong portrait/landscape mode on tablets and foldables; you need a unified strategy that handles rotation semantics and restores orientation correctly after page transitions and full-screen exit.

Quick Start

Use hmos-multidevice-natural-orientation to produce a REQ/DEV/FIX/VAL plan for your target page, ensuring correct natural orientation mapping, setPreferredOrientation usage boundaries, and a device coverage verification matrix.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: hmos-multidevice-natural-orientation
Download link: https://github.com/openharmonyinsight/openharmony-skills/archive/main.zip#hmos-multidevice-natural-orientation

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.