How to add animation end callback

What do you want to achieve?

Screen changes to an animation screen, shows the animation and redirects back to previous screen.

Any hint how to achieve this or how to add callback to an animation end?

There seem to be no direct event for an ‘animation end’ but you can achieve this by setting a timed screen-change event on loading the animation-screen, to a delay that coincides with the time when the animation gets finished, and change back to the first screen with that timed event.

Thanks a lot for your answer. Works like a charm, but I should have been more precise…

Depending on one variable animation screen should return to different screens.

Any hint or idea on this?

I preffer create and test animation in SQ and then move code to my own and remove anim from designer. To this own code you can add ready or other cb and place custom code to end.

You can create a lookup array (called ‘Lookup[]’ for example) containing the pointers of the screen-widget pointers (lv_obj_t ** pointers), and your variable could be an index to request screen-pointers from that array, and something like lv_disp_load_scr(*Lookup[variable]) could switch to the screens pointed by the Lookop[] array value of the given index.