openharmony 鸿蒙 arkts-apis-uicontext-e

2026-08-25 浏览 (1)

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

NameValueDescription
OFFSET0The layout moves up.
Atomic service API: This API can be used in atomic services since API version 11.
RESIZE1The layout is resized.
Atomic service API: This API can be used in atomic services since API version 11.
OFFSET_WITH_CARET14+2The 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+3The 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+4The 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

NameValueDescription
GESTURE0Gesture operation.
ANIMATION1Animation 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

NameValueDescription
ANIMATION1Animation 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

NameValueDescription
ABOUT_TO_RENDER_IN0The 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_OUT1The 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

NameValueDescription
WILL_START0The 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_END1The 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

NameValueDescription
TAP0Tap gesture.
LONG_PRESS1Long press gesture.
PAN2Pan gesture.
PINCH3Pinch gesture.
SWIPE4Swipe gesture.
ROTATION5Rotation 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

NameValueDescription
CALLING_SCOPE0Obtain the UIContext of the current calling scope.
LAST_FOCUS1Obtain the UIContext of the instance that most recently switched to the focused state.
MAX_INSTANCE_ID2Obtain the UIContext of the instance with the largest instance ID.
UNIQUE3Obtain the UIContext of the unique UI instance (when only one UI instance exists).
LAST_FOREGROUND4Obtain the UIContext of the instance that most recently switched to the foreground.
UNDEFINED5Obtain 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 constraint: This API can be used only in the stage model.

NameValueDescription
ENABLED0The custom keyboard remains persistent.
DISABLED1The custom keyboard does not remain persistent.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller

openharmony 鸿蒙 errorcode-canvas

openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent

openharmony 鸿蒙 errorcode-bindSheet

openharmony 鸿蒙 js-apis-arkui-uiExtension-sys

openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo

openharmony 鸿蒙 capi-arkui-rendernodeutils

openharmony 鸿蒙 js-apis-arkui-node

openharmony 鸿蒙 capi-native-node-h

openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/CZNQRjAR