In my project, I want to trigger the implementation in draw() that is present in Element class. In android, we have invalidateSelf to trigger the drawToCanvas(). What is the alternative in HarmonyOS?
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationRepeat(Animator animation) {
shiftColor(drawable.getColorMain(), drawable.getColorSub());
invalidateSelf();
}
});