I created a navigation drawer. To use in several Activities
using a default class for it ( DrawerBase.java
) and extend it in Activities
where I want the Navigation Drawer to open, however I have the following problem:
If I am in Activity Home, I open the menu and click on the Activity Home item, it is reloaded, how can I test the OnNavigationItemSelected()
method of my DrawerBase
class to check if the item I clicked to open is the activity
that I am already and call the command to close the drawer
instead of reloading the activity
?