How to dynamically hide a menu item in BottomNavigationView? : <p>I want to hide a menu item of BottomNavigationView dynamically based on some conditions. I tried the following but it is not working.</p>

<pre><code>mBottomNavigationView.getMenu()
            .findItem(R.id.item_name)
            .setVisible(false);

mBottomNavigationView.invalidate();
</code></pre>
