Enums
NOTE
The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
KeyboardAvoidMode11+
Enumerates the modes in which the layout responds when the keyboard is displayed.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| OFFSET | 0 | The layout moves up. Atomic service API: This API can be used in atomic services since API version 11. |
| RESIZE | 1 | The layout is resized. Atomic service API: This API can be used in atomic services since API version 11. |
| OFFSET_WITH_CARET14+ | 2 | The layout moves up, and this adjustment also occurs if the caret position in the text box changes. Atomic service API: This API can be used in atomic services since API version 14. |
| RESIZE_WITH_CARET14+ | 3 | The layout is resized, and this adjustment also occurs if the caret position in the text box changes. Atomic service API: This API can be used in atomic services since API version 14. |
| NONE14+ | 4 | The layout is not adjusted to avoid the keyboard. Atomic service API: This API can be used in atomic services since API version 14. |
SwiperDynamicSyncSceneType12+
Enumerates the dynamic sync scene types.
Atomic service API: This API can be used in atomic services since API version 12.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| GESTURE | 0 | Gesture operation. |
| ANIMATION | 1 | Animation transition. |
MarqueeDynamicSyncSceneType14+
Enumerates the dynamic sync scene types for the Marquee component.
Atomic service API: This API can be used in atomic services since API version 14.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| ANIMATION | 1 | Animation transition. |
NodeRenderState20+
Enumerates component rendering states.
Atomic service API: This API can be used in atomic services since API version 20.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| ABOUT_TO_RENDER_IN | 0 | The node has been attached to the render tree and will generally be rendered in the next frame. Under normal cases, it may be visible, but "being scheduled for rendering" does not equate to "guaranteed visibility". |
| ABOUT_TO_RENDER_OUT | 1 | The node has been removed from the render tree and will generally not be rendered in the next frame. Users will no longer see this node. |
GestureActionPhase20+
Enumerates triggering phases of gesture callbacks, corresponding to the action callbacks defined in gesture.d.ts. However, different gesture types support different phases (for example, SwipeGesture only includes the WILL_START enumerated value).
Atomic service API: This API can be used in atomic services since API version 20.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| WILL_START | 0 | The gesture has been successfully recognized by the system, and the onActionStart or onAction callback will be triggered immediately. If the gesture is bound to onActionStart, the callback is triggered at onActionStart. If the gesture is bound to onAction, the callback is triggered at onAction. If both are bound, the callback is triggered at onActionStart with priority. If neither is bound, no callback will be triggered. Some containers (for example, scrollable containers) have built-in gestures bound to callbacks, which support the above callback triggering mechanism by default. For these containers, callbacks can be triggered without explicit binding. |
| WILL_END | 1 | The gesture has been determined to be in an ended state (typically occurring when the user lifts their finger to terminate the interaction). The onActionEnd callback will be triggered immediately, but the gesture must be explicitly bound to onActionEnd. Some containers (for example, scrollable containers) have built-in gestures bound to callbacks, which support this end-state determination by default. For these containers, the onActionEnd callback can be triggered without explicit binding. |
GestureListenerType20+
Enumerates the types of gestures to be listened for.
Atomic service API: This API can be used in atomic services since API version 20.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| TAP | 0 | Tap gesture. |
| LONG_PRESS | 1 | Long press gesture. |
| PAN | 2 | Pan gesture. |
| PINCH | 3 | Pinch gesture. |
| SWIPE | 4 | Swipe gesture. |
| ROTATION | 5 | Rotation gesture. |
ResolveStrategy22+
Enumerates resolution strategies for UIContext objects.
Atomic service API: This API can be used in atomic services since API version 22.
System capability: SystemCapability.ArkUI.ArkUI.Full
| Name | Value | Description |
|---|---|---|
| CALLING_SCOPE | 0 | Obtain the UIContext of the current calling scope. |
| LAST_FOCUS | 1 | Obtain the UIContext of the instance that most recently switched to the focused state. |
| MAX_INSTANCE_ID | 2 | Obtain the UIContext of the instance with the largest instance ID. |
| UNIQUE | 3 | Obtain the UIContext of the unique UI instance (when only one UI instance exists). |
| LAST_FOREGROUND | 4 | Obtain the UIContext of the instance that most recently switched to the foreground. |
| UNDEFINED | 5 | Obtain a UIContext with an ambiguous calling scope. |
CustomKeyboardContinueFeature23+
Sets whether the custom keyboard remains persistent during input field switches.
When enabled, the customer keyboard will remain displayed without being dismissed and re-launched during input field switches.
When disabled, the customer keyboard will dismiss and re-launch during input field switches.
Atomic service API: This API can be used in atomic services since API version 23.
System capability: SystemCapability.ArkUI.ArkUI.Full
Model restriction: This API can be used only in the stage model.
| Name | Value | Description |
|---|---|---|
| ENABLED | 0 | The custom keyboard remains persistent. |
| DISABLED | 1 | The custom keyboard does not remain persistent. |
TextSelectionClearPolicy
Enumerates text selection clearing policies.
Since: 26.0.0
Atomic service API: This API can be used in atomic services since API version 26.0.0.
System capability: SystemCapability.ArkUI.ArkUI.Full
Model restriction: This API can be used only in the stage model.
| Name | Value | Description |
|---|---|---|
| KEEP_SELECTED_TEXT_ON_EXTERNAL_TOUCH | 0 | When the user touches outside the text component, the text selection and handles are retained. |
| CLEAR_SELECTED_TEXT_ON_EXTERNAL_TOUCH | 1 | When the user touches outside the text component, the text selection and handles are cleared. |