Skip to content

About

Adaptive layout codelab for Huawei Lite Wearable watches using CSS @media queries to serve separate UIs for round and rectangular screens.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Note: To access all shared projects, get information about environment setup, and view other guides, please visit Explore-In-HMOS Index.

How To Implement Adaptive Layout

This codelab shows how to implement adaptive layouts for lite wearable devices that has round and rectangular screens. They both have different user experiences and layouts therefore they require to have some custom interfaces to provide a better experience to users. This codelab handles this case on CSS side using @media markers, which allows to select CSS layers conditionally according to device screen type.

Preview

Use Cases

  • Adapt different UI components to different screen shapes
  • Utilize radial and cornered designs for different screen shapes

Tech Stack

  • Languages: HML,CSS,JS
  • Frameworks: HarmonyOS SDK 6.1.1(24)
  • Tools: DevEco Studio Vers 6.1.1

Directory Structure

entry/src/main/js/MainAbility
│    
├── pages/          
│   └── index/
│       ├── index.css
│       ├── index.hml
│       └── index.js
├── i18n/
│   ├── en-US.json
│   └── zh-CN.json
└──  app.js

Constraints and Restrictions

Supported Devices

  • Huawei Sport (Lite) Watch GT 4/5/6
  • Huawei Sport (Lite) GT4/5 Pro
  • Huawei Sport (Lite) Fit 3/4
  • Huawei Sport (Lite) D2
  • Huawei Sport (Lite) Ultimate

License

How To Implement Adaptive Layout is distributed under the terms of the MIT License. See the LICENSE for more information.

About

Adaptive layout codelab for Huawei Lite Wearable watches using CSS @media queries to serve separate UIs for round and rectangular screens.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages