title: How to programmatically change Bottom Navigation View's Icons?
body: <p>I want know how can I change Bottom Navigation View's Icons when user basically selects it and then again replace it with previous icon if user selects different option.</p>
  
  <p><a href="https://i.stack.imgur.com/4zB43.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4zB43.png" alt="enter image description here"></a>
  Below is my switch case snippet.</p>
  
  <p>switch (menuItem.getItemId()) {</p>
  
  <pre><code>            case R.id.ic_home:
  
                  selectedFragment = new HomeFragment();
  
                  //menuItem.setIcon(R.drawable.like_colored);
  
                  break;
  
              case R.id.ic_connect:
  
                  selectedFragment = new ConnectionFragment();
  
                  break;
  
              case R.id.ic_add:
  
                  selectedFragment = new AddPostFragment();
  
                  break;
  
              case R.id.ic_noti:
  
                  selectedFragment = new NotificationFragment();
  
                  break;
  
              case R.id.ic_profile:
  
                  selectedFragment = new ProfileFragment();
  
                  break;
  </code></pre>