Full screen animation with fade

Description

I’m wondering if it would be possible to enter/exit a screen using an animation that does two things:

  1. Split the screen into two objects, right down the middle, so a left side object and a right side object.
    when the screen is called, the objects will slide in each from their own side, so the left object slides in from the left, and the right object slides in from the right.
  2. While the object slides in/out, It would also be nice to fade in/out, so it would give a nice visual affect.

Is this something that can be done with the animations?

What MCU/Processor/Board and compiler are you using?

Teensy 4.1 (with extra PSRAM)

What LVGL version are you using?

Latest (7.3)

Hi,

There are some ready to use screen change animations: https://docs.lvgl.io/latest/en/html/overview/object.html#load-screen-with-animation

If you need something different the existing ones should be good starting point.

@kisvegabor this is great, thanks for the link!
Although you mentioned that it can be used to animate a screen, can I run two animations simultaneously on two main objects in the screen?

Yes; you would use the normal animation API for this. I’ll see if I can find you an example.

/* From `lv_demo_widgets */
static void gauge_anim(lv_obj_t * gauge, lv_anim_value_t value)
{
    lv_gauge_set_value(gauge, 0, value);
}
. . .
    lv_anim_t a;
    lv_anim_init(&a);
    lv_anim_set_var(&a, gauge);
    lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t)gauge_anim);
    /* Animate from 0 to 100... */
    lv_anim_set_values(&a, 0, 100);
    /* ...over the space of 4 seconds (4000 ms) */
    lv_anim_set_time(&a, 4000);
    lv_anim_start(&a);

hello, Have relevant Animate demo?