我想知道如何暂停和重新启动动画。我遵循了这段代码,但它对我不起作用:
animRight = AnimationUtils.loadAnimation(this, R.anim.move_right1);
animRight.setDuration(3000);
mTv1.setVisibility(TextView.VISIBLE);
mTv1.setBackgroundResource(R.drawable.hand);
animRight.setAnimationListener(this);
mTv1.startAnimation(animRight);
// override methods
@Override
public void onAnimationEnd(Animation animation) {
// when animations is finished
}
@Override
public void onAnimationStart(Animation animation) {
// when animations is start
}
@Override
public void onAnimationRepeat(Animation animation) {
// when animations is repeated
}
这里我想暂停并重新启动动画。我该怎么做?
答案 0 :(得分:0)
答案 1 :(得分:0)
没有暂停方法。你可以去实施postDelayed。