我正在实现一个 Lottie 动画,整个动画效果很好!但是,我想添加一些代码,在 30 帧后暂停动画,然后我可以在一定时间后恢复。这是到目前为止的代码:
animationView.playAnimation(0, 30)
animationView.addAnimatorListener(object : Animator.AnimatorListener {
override fun onAnimationEnd(animation: Animator) {
if (isLoading == false) {
//Everything has loaded. Continue Animation
//This line has no effect. The animation does not continue
animationView.playAnimation(30, 60)
//Resuming the animation just makes the animation disappear
//animation.resume()
}
}