How to play animation when widget is destroy

Hi, I wanted to play animation when the widget is destroyed. How do you do that?

You will need to be more specific regarding what kind of animation you mean.

If you mean a widget animation, do note that if you play an animation and destroy the widget (or the other way round) immediately, it will not play as there’s nothing to play since the widget is gone…

Rather than destroying the widget immediately, see if you can implement something along the lines of:

Above, this icon indicates a latent action.


Essentially, wait until the animation has finished and only then remove the widget.