harmony 鸿蒙ArkUI_NativeDialogAPI_2
ArkUI_NativeDialogAPI_2
Overview
Provides the custom dialog box APIs (version 2) for the native side.
Since: 15
Related module: ArkUI_NativeModule
Summary
Member Variables
Name | Description |
---|---|
ArkUI_NativeDialogAPI_1 nativeDialogAPI1 | A set of the custom dialog box APIs on the native side. |
int32_t(* setKeyboardAvoidDistance )(ArkUI_NativeDialogHandle handle, float distance, ArkUI_LengthMetricUnit unit) | Sets the minimum distance between the dialog box and the keyboard after keyboard avoidance is applied. |
int32_t(* setLevelMode )(ArkUI_NativeDialogHandle handle, ArkUI_LevelMode levelMode) | Sets the display level of the dialog box. |
int32_t(* setLevelUniqueId )(ArkUI_NativeDialogHandle handle, int32_t uniqueId) | Sets the ID of the node under the dialog box’s display level. |
int32_t(* setImmersiveMode )(ArkUI_NativeDialogHandle handle, ArkUI_ImmersiveMode immersiveMode) | Sets the display area of the embedded dialog box overlay. |
Member Variable Description
setKeyboardAvoidDistance
int32_t(* ArkUI_NativeDialogAPI_2::setKeyboardAvoidDistance) (ArkUI_NativeDialogHandle handle, float distance, ArkUI_LengthMetricUnit unit)
Description
Sets the minimum distance between the dialog box and the keyboard after keyboard avoidance is applied. The default value is 16vp, and the default unit is vp. This API takes effect only when keyboardAvoidMode is set to DEFAULT.
Since: 15
Parameters
Name | Description |
---|---|
handle | Pointer to the custom dialog box controller. |
distance | Distance value between the dialog box and the keyboard. |
ArkUI_LengthMetricUnit | Unit of the distance. |
Returns
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful; returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
setLevelMode
int32_t(* ArkUI_NativeDialogAPI_2::setLevelMode) (ArkUI_NativeDialogHandle handle, ArkUI_LevelMode levelMode)
Description
Sets the display level of the dialog box. This API must be called before show.
Since: 15
Parameters
Name | Description |
---|---|
handle | Pointer to the custom dialog box controller. |
levelMode | Display level mode, specified by an enumeration value of type ArkUI_LevelMode. |
Returns
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful; returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
setLevelUniqueId
int32_t(* ArkUI_NativeDialogAPI_2::setLevelUniqueId) (ArkUI_NativeDialogHandle handle, int32_t uniqueId)
Description
Sets the ID of the node under the dialog box’s display level. This API must be called before setLevelMode.
Since: 15
Parameters
Name | Description |
---|---|
handle | Pointer to the custom dialog box controller. |
uniqueId | ID of the node under the dialog box’s display level. The dialog box will be displayed on the same page as this node. |
Returns
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful; returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
setImmersiveMode
int32_t(* ArkUI_NativeDialogAPI_2::setImmersiveMode) (ArkUI_NativeDialogHandle handle, ArkUI_ImmersiveMode immersiveMode)
Description
Sets the display area of the embedded dialog box overlay. This API must be called before show.
Since: 15
Parameters
Name | Description |
---|---|
handle | Pointer to the custom dialog box controller. |
immersiveMode | Display area, specified by an enumeration value of type ArkUI_ImmersiveMode. |
Returns
Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful; returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙ARKUI_TextPickerCascadeRangeContent
harmony 鸿蒙ARKUI_TextPickerRangeContent
harmony 鸿蒙ArkUI_AnimateCompleteCallback
harmony 鸿蒙ArkUI_ContextCallback
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦