0
I’m building an application with Python and Kivy.
To toggle the screens use Kivy’s Screenmanager. Ex.:
Button:
text: 'Sair de Tela 2 e voltar para Tela 1'
size_hint_y: None
height: 100
on_press: root.manager.current = 'tela1'
However, on Screen 2 I add and delete items from a list, among other things that change the screen layout. And I need that when I leave this screen, everything is clean/reset, so that when I return the screen is clean and also so that it does not overload the application with unnecessary items saved in the layout.
I know the method self clear_widgets(), But I would like to know if Screenmanager() has any property or method that does this? Because if I have to create a function that makes the screen transition, using clear_widgets() to clean the screen... I think it is impossible to continue with Screenmanager()
there is the method
root.manager.clear_widgets()
– tomasantunes