Now, I have the problem that my animation won't repeat.
It plays just once.
My onCreate does this:
testAnimation = AnimationUtils.loadAnimation(getBaseContext(),
R.anim.testanim);
testAnimation.setAnimationListener(mAnimationListener);
testAnimation.setDuration(3000);
testAnimation.setRepeatCount(10);
testAnimation.setRepeatMode(Animation.RESTART);
and my onClick does this:
if (running) { // Currently running, stop it
button.setText(R.string.Button01);
testShape.clearAnimation();
} else { // Currently stopped, start it
button.setText(R.string.BtnStop);
testShape.startAnimation(testAnimation);
}
The animation plays exactly once, and the listeners onAnimationStart() is
called exactly once.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en