How to dynamically hide a menu item in BottomNavigationView?
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. I tried most of solutions but this worked for me, For hiding an item dynamically : bottomNavigationView.findViewById(R.id.xyz).setVisibility(View.GONE); For making item visible: bottomNavigationView.findViewById(R.id