OH_ArkUI_CustomDialog_SetWidth

Function OH_ArkUI_CustomDialog_SetWidth 

Source
pub unsafe extern "C" fn OH_ArkUI_CustomDialog_SetWidth(
    options: *mut ArkUI_CustomDialogOptions,
    width: f32,
    unit: ArkUI_LengthMetricUnit,
) -> i32
Available on crate features api-12 and api-19 only.
Expand description

Sets the width of the dialog box background.

§Arguments

  • options - Dialog box parameters.

  • width - Width of the background.

  • unit - Unit of the width. The default value is vp.

§Returns

  • Returns the error code. Returns [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. Returns [ARKUI_ERROR_CODE_PARAM_INVALID] if a parameter error occurs.

Available since API-level: 19