【发布时间】:2011-08-16 04:25:06
【问题描述】:
我想知道如何暂停和重新启动动画。我遵循了这段代码,但它对我不起作用:
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
}
在这里我想暂停并重新开始动画。我该怎么做?
【问题讨论】:
标签: android android-layout android-animation