it should be like:
if entered this screen: call(function) I am also writing code using .kv file and .py at the same time so please give me a tip that will work in my occasion)
Use either on_pre_enter
or on_enter
events in Python code or in kv file. Please refer the following snippets or another example using on_pre_enter
Events:
on_pre_enter: ()
Event fired when the screen is about to be used: the entering animation is started.
class ScreenTwo(Screen):
def on_pre_enter(self):
self.callback()
def callback(self):
print("callback")
<ScreenTwo>:
on_pre_enter: root.callback()