I want to hide a menu item of BottomNavigationView dynamically based on some conditions. I tried the following but it is not working.
mBottomNavigationView.getMenu()
.findItem(R.id.item_name)
.setVisible(false);
mBottomNavigationView.invalidate();
mBottomNavigationView.getMenu().removeItem(R.id.item_name);
removeItem does the trick. Not sure why setVisible method is not working.