Android Browsing Animation Life Cycle

I want to ask if the animation will be canceled when the view is destroyed, for example, when changing the configuration.

I have a delayed animation and callback. Therefore, I worry if, after viewing, destroy the callback will be completed or not.

 view.animate()
     .setStartDelay(2000)
     .withEndAction(new Runnable() {
            @Override
            public void run() {
                //do something
            }
        });
+4
source share
1 answer

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

send here

0
source

Source: https://habr.com/ru/post/1651055/


All Articles