harmony 鸿蒙ArkUI_NativeAnimateAPI_1

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

ArkUI_NativeAnimateAPI_1

Overview

Declares the native animation APIs provided by ArkUI.

Since: 12

Related module: ArkUI_NativeModule

Summary

Member Variables

Name Description
int32_t(* animateTo )(ArkUI_ContextHandle context, ArkUI_AnimateOption *option, ArkUI_ContextCallback *update, ArkUI_AnimateCompleteCallback *complete) Defines an explicit animation.
int32_t(* keyframeAnimateTo )(ArkUI_ContextHandle context, ArkUI_KeyframeAnimateOption *option) Defines a keyframe animation.
ArkUI_AnimatorHandle(* createAnimator )(ArkUI_ContextHandle context, ArkUI_AnimatorOption *option) Creates an animator object.
void(* disposeAnimator )(ArkUI_AnimatorHandle animator) Disposes of an animator object.

Member Variable Description

animateTo

int32_t(* ArkUI_NativeAnimateAPI_1::animateTo) (ArkUI_ContextHandle context, ArkUI_AnimateOption *option, ArkUI_ContextCallback *update, ArkUI_AnimateCompleteCallback *complete)

Description

Defines an explicit animation.

Parameters

Name Description
context UIContext instance.
option Defines the animation configuration.
update Closure function for the animation. The system automatically inserts the transition animation if the state changes in the closure function.
complete Callback invoked when the animation playback is complete.

NOTE

Make sure the component attributes to be set in the event closure have been set before.

Returns

Returns ARKUI_ERROR_CODE_NO_ERROR if the operation is successful.

Returns ARKUI_ERROR_CODE_PARAM_INVALID if a parameter error occurs.

createAnimator

ArkUI_AnimatorHandle(* ArkUI_NativeAnimateAPI_1::createAnimator) (ArkUI_ContextHandle context, ArkUI_AnimatorOption *option)

Description

Creates an animator object.

Parameters

Name Description
context UIContext instance.
option Animator parameter.

Returns

Returns the pointer to the animator object; returns NULL if a parameter error occurs.

disposeAnimator

void(* ArkUI_NativeAnimateAPI_1::disposeAnimator) (ArkUI_AnimatorHandle animator)

Description

Disposes of an animator object.

Parameters

Name Description
animator Animator object.

keyframeAnimateTo

int32_t(* ArkUI_NativeAnimateAPI_1::keyframeAnimateTo) (ArkUI_ContextHandle context, ArkUI_KeyframeAnimateOption *option)

Description

Defines a keyframe animation.

Parameters

Name Description
context UIContext instance.
option Keyframe animation parameter.

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

harmony 鸿蒙ARKUI_TextPickerCascadeRangeContent

harmony 鸿蒙ARKUI_TextPickerRangeContent

harmony 鸿蒙ArkUI_AnimateCompleteCallback

harmony 鸿蒙ArkUI_AttributeItem

harmony 鸿蒙ArkUI_ColorStop

harmony 鸿蒙ArkUI_ContextCallback

harmony 鸿蒙ArkUI_EventModule

harmony 鸿蒙ArkUI_ExpectedFrameRateRange

harmony 鸿蒙ArkUI_IntOffset

0  赞