Vérifiez si AnimatorSet a terminé l'animation?

Je suis en train d'animer des boutons avec fondu dans l'animation à l'aide de AnimatorSet

Button fades in > Click button > Remaining buttons fade out

Ainsi afin de faire cela, je veux mettre le onClickListner after the animation is completedmais cela ne semble pas fonctionner. En cliquant sur un bouton dans le milieu de l'animation triggers the onClick action:

setQuestion = new AnimatorSet();           
setQuestion.playSequentially(fadeinAnimationQ,fadeinAnimation1,fadeinAnimation2,fadeinAnimation3,fadeinAnimation4,fadeinAnimation5);
setQuestion.start();

C'est la méthode qui vérifie if the animation has finished.

private void checkAnimation() {
    while (true) {
        //Check if animation has ended
        if (setQuestion.isRunning() == false) {
            assignListners();
            break;
        }
    }
}

source d'informationauteur Zen | 2014-02-18