MDBottomNavigationItem screen on_enter was not called

64 views
Skip to first unread message

Ho

unread,
May 25, 2019, 8:05:51 AM5/25/19
to KivyMD users support
Hi,
i need some help. i am using BottomNavigation for my app. Below is portion of my code. When i press 'Transaction', transaction screen displayed but the on_enter function was not called. i wan to achieve in such way that every time user press the navigation button that screen on_enter function was called. How can i achieve that??

Kv file:

MDBottomNavigation:
MDBottomNavigationItem:
name: 'Home'
text: 'home'
icon: 'apps'
HomeScreen: <= i put my homescreen here

MDBottomNavigationItem:
name: 'Transaction'
text: 'Transaction'
icon: 'autorenew'
Transaction: <= i put my transactionscreen here

py file:

class HomeScreen(Screen):
def on_enter(self):
print("Homescreen on enter was called")

class Transaction(Screen):
def on_enter(self):
print("TransactionScreen on enter was called")

Raphael Reis

unread,
Jan 30, 2023, 8:47:05 PM1/30/23
to KivyMD users support
I have the same problem, but i don't know the solution! Sorry..
Reply all
Reply to author
Forward
0 new messages