You can use a class to add the menu items (pass the activity as a parameter to the class). The menu click event will still fire on the activity module. You can use a single event for all the menu items and then delegate it to the class. This will allow you to share the code between all the modules:
B4X:
Sub Menu_Click
MenuHandlerClassInstance.MenuClick(Sender) 'sender will be the menu text
End Sub
It is this or I need to add the menu, items and click code in all the activities?
Thats what you normally do?
May exists a compiler INCLUDE(file) to include the same code in many modules?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.