1 Star 26 Fork 25

HarmonyOS_Codelabs/MultiDeviceCommunication

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

Instant Messaging

Introduction

Learn to implement an instant messaging app based on the adaptive layout and responsive layout, achieving one-time development for multi-device deployment.

Description

This codelab implements an instant messaging app based on the adaptive layout and responsive layout, achieving one-time development for multi-device deployment. It uses the three-layer project architecture for code reuse and tailors the pages to different device sizes such as mobile phones, foldable phones, and PC/2-in-1 devices. The following figure shows the effect on the mobile phone:

The following figure shows the effect on the foldable phone in unfolded state:

The following figure shows the effect on the PC/2-in-1 device:

Concepts

  • One-time development for multi-device deployment: It enables you to develop and release one set of project code for deployment on multiple devices as demanded. This feature enables you to efficiently develop applications that are compatible with multiple devices while providing distributed user experiences for cross-device transferring, migration, and collaboration.
  • Adaptive layout: When the size of an external container changes, elements can automatically change based on the relative relationship to adapt to the external container. Relative relationships include the proportion, fixed aspect ratio, and display priority. Common adaptive layouts include linear, stacking, flexbox, and relative layouts. These capabilities enable the GUI to continuously change with the size of the external container.
  • Responsive layout: When the size of an external container changes, elements can automatically change based on the breakpoints, grids, or specific features (such as the screen direction and window width and height) to adapt to the external container.
  • Navigation: This component is the root container of pages, usually used in the split-view layout.

Permissions

N/A.

How to Use

  • Install and open an app on a mobile phone, foldable phone, or tablet. The responsive layout and adaptive layout are used to display different effects on the app pages over different devices.
  • Tap Message, Contacts, or Social Circle at the bottom to switch to the corresponding tab page. By default, the Message tab page is displayed.

Constraints

  1. The sample app is supported only on Huawei phones running the standard system.
  2. HarmonyOS: HarmonyOS 5.0.0 Release or later
  3. DevEco Studio: DevEco Studio 5.0.0 Release or later
  4. HarmonyOS SDK: HarmonyOS 5.0.0 Release SDK or later

Empty file

About

基于自适应和响应式布局,实现一次开发,多端部署-即时通讯类应用,视觉、控件等符合设计规范,并包含键鼠适配、横屏适配等。 expand collapse
Cancel

Releases

No release

Contributors

All

Language(Optional)

Activities

can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/harmonyos_codelabs/MultiDeviceCommunication.git
git@gitee.com:harmonyos_codelabs/MultiDeviceCommunication.git
harmonyos_codelabs
MultiDeviceCommunication
MultiDeviceCommunication
master

Search