How to navigation back to the previous screen?

What do you want to achieve?

In first screen use lv.scr_load_anim to load the second screen with auto_del = False, by delete the second screen in event callback ad navigation back to the first screen

What have you tried so far?

delete(), del_async() both crash, where is wrong?

# navigation to second screen
 if event == lv.EVENT.CLICKED | lv.EVENT.PRESSED:
            lv.scr_load_anim(self.QuickStart(), lv.SCR_LOAD_ANIM.OVER_LEFT, 200, 0, False)

# navigation back to first screen
if isinstance(target, lv.imgbtn):
                    if target == self.nav_back:
                        self.DELETED = True
                        # self.add_flag(lv.obj.FLAG.HIDDEN)

Hi you there?
I got the same situation like you.And I have knowledge of that you couldn’t delete the screen which is active now,it causes crash.
In my situation,I want to turn to B screen when clicked A screen,and then clicked B to turn back A.But the POINT is now I cannot get the previous screen(A screen) using ‘lv_disp_get_scr_prev’,it always be NULL.

1 Like

This may be of help?