I have a navigation drawer. When an event is called, I want to hide one of my navigation menu item for user. How can I do that?
protected void onCreate(Bundle sa
This will work as setInvisibility(GONE):
Menu nav_Menu = navigationView.getMenu();
nav_Menu.findItem(R.id.nav_profile).setVisible(false);
nav_Menu.findItem(R.id.menu_login).setVisible(true);
nav_Menu.findItem(R.id.menu_logout).setVisible(false);
nav_Menu.findItem(R.id.menu_regsitration).setVisible(true);