posted 5 years ago
How can I remove all the code pertaining to my Actionbar/Menubar from every activity and put it in a single class. Then instantiate that class and include it in every single one of my activities (is this possible or this code needs to be repeated in every activity?). That way I can reuse the code instead of typing the code all over again. The first thing I did was to move all code from Actionbar and create a single class. Then I instantiate the MenubarActivity class in every activity but that is not working. If someone can give me some clues how to/what is the best way to achieve this. Or what am I doing wrong on my code. Thanks MenubarActivity code:
Menu for actionbar
Instatiating MenuBarActivity in all activities
what is the proper way to include the MenuBarActivity in every single activity, so the actionbar gets displayed with the activity? Thanks