Starting Frame-By-Frame Animation

Posted by OceanBlue on Stack Overflow See other posts from Stack Overflow or by OceanBlue
Published on 2010-05-07T00:02:09Z Indexed on 2010/05/07 0:08 UTC
Read the original article Hit count: 280

Filed under:
|

Hi,

I have a basic question about starting a frame-by-frame animation.

When I call the AnimationDrawable.start() method from my code directly, it doesn't seem to work.

public void onCreate(Bundle savedInstanceState) {  
   ...  
   mAnimation.start();  
   ...  
}

But if I put this line inside the onClick() callback method of a button, pressing the buton starts the animation.

Why doesn't this line work in the code?

Thanks!

© Stack Overflow or respective owner

Related posts about android

Related posts about animation