Я пытаюсь оживить кнопки с замиранием в анимации с использованием AnimatorSet
Проверьте, завершена ли анимация AnimatorSet?
Button fades in > Click button > Remaining buttons fade out
Так что для того, чтобы сделать это, я хочу, чтобы установить onClickListner after the animation is completed
, но это не похоже на работу , При нажатии на кнопку в середине анимации triggers the onClick action
:
setQuestion = new AnimatorSet();
setQuestion.playSequentially(fadeinAnimationQ,fadeinAnimation1,fadeinAnimation2,fadeinAnimation3,fadeinAnimation4,fadeinAnimation5);
setQuestion.start();
Это метод, который проверяет if the animation has finished
.
private void checkAnimation() {
while (true) {
// Check if animation has ended
if (setQuestion.isRunning() == false) {
assignListners();
break;
}
}
}
Вот как можно добавить AnimatorListner: http://stackoverflow.com/questions/7274001/how-do-i-do-something-when-an-animation-finishes – Zen