title: How to fix bottom navigation bar not showing correctly
body: <p>I'm having the problem that when I trying to switch between the menu item. The menu item will not pointing to the correct icon.
  here is the flow when i found this problem </p>
  
  <ol>
  <li>starting at the (Home)fragment,then press on the second menu item (Features )</li>
  </ol>
  
  <pre><code>case R.id.nav_home:
      //home fragment transaction
      actionBar.setTitle("Home");
      HomeFragment fragment1 = new HomeFragment();
      FragmentTransaction fragmentTransaction1 = getSupportFragmentManager().beginTransaction();
      fragmentTransaction1.replace(R.id.content, fragment1, "");
      fragmentTransaction1.commit();
      break;
  
  </code></pre>
  
  <ol start="2">
  <li>second menu item (features) will go to features activity </li>
  </ol>
  
  <pre><code>case R.id.nav_features:
      //features fragment transaction
      startActivity(new Intent(DashboardActivity.this, FeaturesActivity.class));
      break;
  </code></pre>
  
  <ol start="3">
  <li>close features activity and back to (Home) fragment</li>
  </ol>
  
  <pre><code>onBackPressed(); 
  </code></pre>
  
  <ol start="4">
  <li>bottom navigation still pointing to second menu item (features).</li>
  </ol>
  
  <p>how can I make the system point to the correct menu item ?<a href="https://i.stack.imgur.com/OYXAD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OYXAD.jpg" alt="enter image description here"></a></p>