I just ran into a problem that I'm pretty sure is a bug in the Animation
class.
I have a simple Animation that doesn't repeat.
I use view.setAnimation() to run it.
When it's done, I use view.clearAnimation();

Sometime later, I want to run it again.  So I use view.setAnimation()
again.  The view flickers and nothing happens.
So I did some poking around to see what was happening.  (One useful
diagnostic was that I created an AnimationWrapper that just logs when every
Animation method is called.)
View calls Animation.reset(), then starts using the Animation.
The problem is that Animation.reset() does NOT reset the animation start
time.  So when the animation starts, the time is long past the animation
expiration, so it stops immediately.

Workaround: call Animation.setStartTime( -1) before you call
view.setAnimation().
Fix: Animation.reset() should set mStartTime = -1;

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to