How to load a screen with animation manually?

Description

I want to load a screen manually and I’m using lv_scr_load_anim function for it. but it doesn’t work! would you please tell me what should i do for changing my screen manually with animation?

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

ESP32-Arduino IDE

What LVGL version are you using?

8.3

What have you tried so far?

I used the function below but it didn’t work.
lv_scr_load_anim(ui_Clock,LV_SCR_LOAD_ANIM_OVER_LEFT,500,0,true);

This is the code I wrote in micropython and it can run. I hope it will be helpful to you

Blockquotedef event_cb(e):
btn = e.get_target_obj()
code = e.get_code()
if code == lv.EVENT.CLICKED: lv.scr_load_anim(scr2,lv.SCR_LOAD_ANIM.OVER_LEFT,1000,1000,True)#OVER_LEFT,FADE_OUT
scr = lv.obj()
scr.set_style_bg_color(lv.color_hex(0x003a57), lv.PART.MAIN)
btn = lv.btn(scr)
btn.align(lv.ALIGN.CENTER, 0, 0)
btn.add_event(event_cb, lv.EVENT.CLICKED, None)
label = lv.label(btn)
label.set_text(‘Hello World!’)
label.align(lv.ALIGN.CENTER, 0, 0)
scr2 = lv.obj()
scr2.set_style_bg_color(lv.color_hex(0x000000), lv.PART.MAIN)
label = lv.label(scr2)
label.set_text(“Hello MY friend”)
label.set_style_text_color(lv.color_hex(0xffffff), lv.PART.MAIN)
label.align(lv.ALIGN.CENTER, 0, 0)
lv.scr_load(scr)
‘’‘>>> help(lv.SCR_LOAD_ANIM)
object <class ‘LV_SCR_LOAD_ANIM’> is of type type
NONE – 0
OVER_LEFT – 1
OVER_RIGHT – 2
OVER_TOP – 3
OVER_BOTTOM – 4
MOVE_LEFT – 5
MOVE_RIGHT – 6
MOVE_TOP – 7
MOVE_BOTTOM – 8
FADE_IN – 9
FADE_ON – 9
FADE_OUT – 10
OUT_LEFT – 11
OUT_RIGHT – 12
OUT_TOP – 13
OUT_BOTTOM – 14’‘’
group = lv.group_create() # Create a group
group.add_obj(btn)
button_driver.group = group