Java – Android View animation lifecycle

Android View animation lifecycle… here is a solution to the problem.

Android View animation lifecycle

I would like to ask if the animation is canceled when the View is destroyed, such as when the configuration changes.

I have animations with delays and callbacks. So I’m worried about whether the View Destroy callback will be executed afterward.

     .withEndAction(new Runnable() {
            public void run() {
                do something


You can call anim.cancel(); You can also call anim.reset();


Related Problems and Solutions