Starting Frame-By-Frame Animation

后端 未结 3 1239
野趣味
野趣味 2020-11-27 07:14

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\

3条回答
  •  遥遥无期
    2020-11-27 07:41

    Use a Runnable to insert the start() message to message queue, just add this LOC to replace your mFrameAnimation.start();

    img.post(new Starter());
    

    Helper inner class:

    class Starter implements Runnable {
            public void run() {
                mFrameAnimation.start();
            }
    }
    

提交回复
热议问题