title: Only one fragment shown all time
body: <p>In my application I use three fragment activity for navigation drawer but on replacing one fragment with using fragment transaction always the last fragment is shown why?. Here is my code :- </p>
  
  <pre><code>public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
      Fragment fragment = new HomeFragment();
      Class fragmentClass = null;
      switch (position) {
          case 0:
              Log.d("position1", String.valueOf(position));
              fragmentClass = FarecardFragment.class;
          case 1:
              Log.d("position1", String.valueOf(position));
              fragmentClass = MybookingFragment.class;
          case 2:
              Log.d("position1", String.valueOf(position));
              fragmentClass = TrackingFragment.class;
      }
      try {
          fragment = (Fragment) fragmentClass.newInstance();
      } catch (Exception e) {
          e.printStackTrace();
      }
      FragmentManager fragmentManager = getFragmentManager();
      fragmentManager.beginTransaction().replace(R.id.mainContent, fragment).commit();
  }
  </code></pre>