harmony 鸿蒙Overview of ArkTs Widget Page Editing Interaction

  • 2025-06-12
  • 浏览 (3)

Overview of ArkTs Widget Page Editing Interaction

The home screen provides a unified widget editing page. The widget provider uses the startSecondPage method provided by FormEditExtensionContext of the FormEditExtensionAbility component to transfer the level-2 editing page information to the home screen. After the home screen opens the level-2 editing page, the page content can be edited.

The following figure shows the widget editing process.

Figure 1 Widget editing process

FormEditExtensionAbility

  1. When a user taps a widget to edit it, the widget provider inherits FormEditExtensionAbility to implement the widget editing function.

  2. After the user identifies that the widget provider inherits FormEditExtensionAbility, the level-1 editing page of the widget provider is displayed.

  3. The widget provider invokes the startSecondPage method of FormEditExtensionContext in the callback method onSessionCreate of FormEditExtensionAbility to transfer the level-2 page information of the widget provider to be started to the widget management service.

  4. The widget management service transfers the received level-2 page information of the widget provider to the user.

  5. Then the user opens the level-2 page to edit the page content.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Form Kit

harmony 鸿蒙Configuring Widget Configuration Files

harmony 鸿蒙Updating Widget Content by Widget Host (for System Applications Only)

harmony 鸿蒙Creating an ArkTS Widget

harmony 鸿蒙Launching the UIAbility of the Widget Provider in the Background Through the call Event

harmony 鸿蒙Editing and Updating the Widget Content

harmony 鸿蒙Updating Widget Content Through the message Event

harmony 鸿蒙Widget Event Capability Overview

harmony 鸿蒙Launching the UIAbility of the Widget Provider Through the router Event

harmony 鸿蒙Updating Widget Content Through the router or call Event

0  赞