MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / createAnimationSet

Function createAnimationSet

packages/core/ui/animation/index.android.ts:89–106  ·  view source on GitHub ↗
(animators: android.animation.ObjectAnimator[], iterations: number)

Source from the content-addressed store, hash-verified

87}
88
89function createAnimationSet(animators: android.animation.ObjectAnimator[], iterations: number): android.animation.AnimatorSet {
90 iterations = getAndroidRepeatCount(iterations);
91
92 const animatorSet = new android.animation.AnimatorSet();
93 const animatorsArray = Array.create(android.animation.Animator, animators.length);
94
95 animators.forEach((animator, index) => {
96 animatorsArray[index] = animator;
97
98 //TODO: not sure if we have to do that for each animator
99 animatorsArray[index].setRepeatCount(iterations);
100 });
101
102 animatorSet.playTogether(animatorsArray);
103 animatorSet.setupStartValues();
104
105 return animatorSet;
106}
107
108export class Animation extends AnimationBase {
109 private _animatorListener: android.animation.Animator.AnimatorListener;

Callers 1

_createAnimatorsMethod · 0.85

Calls 3

getAndroidRepeatCountFunction · 0.85
forEachMethod · 0.80
createMethod · 0.65

Tested by

no test coverage detected