目录

Previewing Your App/Atomic Service on Multiple Devices

If your app/atomic service is designed to run on multiple types of devices, you can see how it behaves on different devices while you are building it. This helps you make sure that your app/atomic service will run properly on devices with varying screen resolutions, shapes, and sizes.

A maximum of four devices is allowed at a time for multi-device preview.

With the Previewer, you can put apps/atomic services written in ArkTS or JS side-by-side, and compare how they run on different devices. However, this multi-device preview feature does not work when the devices used support different programming languages.

Below, an app/atomic service written in ArkTS is used to show how the multi-device previewer works. The procedure is the same for apps/atomic services written in JS.

  1. In the project directory, open any .ets file (.hml/.css/.js file for apps/atomic services developed in JS).
  2. To open the Previewer, do either of the following:

    • On the menu bar, choose View > Tool Windows > Previewer.
    • On the toolbar in the upper right corner of the editing window, click Previewer.

  3. In the Previewer window, enable Multi-profile preview in Profile Manager and view how your app/atomic service runs on multiple devices.

    Multi-profile preview does not support animations. To preview animations, disable this feature and view animations on a single device.

    Below you can see how the multi-device preview works.