New to android i would like to make some smooth animation.
I have a file on device that contains effects and each effect is an animation. The file tells me when an effect will be played and the effect duration.
The problem is i cannot chain animatorSet dynmacily :
AnimatorSet mainAnimatorSet();
_listAllAnimator // Will contain every AnimatorSet();
for (int i = 0; i < listEffects; i++)
{
// Build animatorSet
ObjectAnimaTor1...
ObjectAnimaTor2...
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.play(ObjectAnimaTor1).with(ObjectAnimaTor2);
_listAllAnimator.add(animatorSet);
}
Now how can i want mainAnimatorSet() from my list of AnimatorSet(); each animations start at the end of the last one.
for (int i = 0; i < _listAllAnimator.size(); i++)
{
if (i==0) {
mainAnimatorSet.play(animSet.get(i));
}
else {
mainAnimatorSet.play(animSet.get(i)).after(animSet.get(i-1));
}
}
mainAnimatorSet.start();
This does not work. Thanks