How can I get menu item in NavigationView?
I think you should first get the menu like this:
navigationView.getMenu().findItem(R.id.login).setVisible(false);
The main aspect of this code is calling navigationView.getMenu() to get the menu from this you will have a reference of current inflated menu and call findViewById() and after that you can whatever you what.
For Group of item ex:-
<group
android:id="@+id/group_1"
android:checkableBehavior="single"
android:visible="false">
...
and then you can control this using :-
navigationView.getMenu().setGroupVisible(R.id.group_1, true)
You can get that by method of NavigationView.getMenu()
Menu menuNav = mNavigationView.getMenu();
Then you can find specific item by
MenuItem logoutItem = menuNav.findItem(R.id.menu_logout);
See Official documentation for NavigationView
just use below way
nav_draw = (NavigationView) findViewById(R.id.nav_draw);
nav_draw.getMenu().findItem(R.id.navigation_item_1).setVisible(false);