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
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this); Menu menu =navigationView.getMenu(); MenuItem target = menu.findItem(R.id.nav_target); target.setVisible(false);