title: ActionBar List Navigation Overlapping Fragments
body: <p>I'm trying to implement the Android Action Bar in list navigation mode, it successfully changes fragments when an item is selected from the list, but the fragments overlap and I can see the content of the previous one still on the screen when the second is selected. Here's my code for the Activity's OnCreate and OnNavigationItemSelected:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
  
      mFirstFragment = new FirstFragment();
      mSecondFragment = new SecondFragment();
  
      SpinnerAdapter mSpinnerAdapter = ArrayAdapter.createFromResource(
              this, 
              R.array.action_list, 
              android.R.layout.simple_spinner_dropdown_item);
  
      mActionBar = getActionBar();
      mActionBar.setDisplayShowTitleEnabled(false);
      mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
      mActionBar.setListNavigationCallbacks(mSpinnerAdapter, this);
  
      if(savedInstanceState != null) {
          mActionBar.setSelectedNavigationItem(
                  savedInstanceState.getInt("currFragment"));
      }
  }
  
  public boolean onNavigationItemSelected(int position, long itemId) {
      FragmentTransaction mFragmentTransaction = 
              getFragmentManager().beginTransaction();
  
      switch(position) {
          case FIRST_FRAGMENT:
              mFragmentTransaction.replace(
                      android.R.id.content, 
                      mFirstFragment);
              break;
          case SECOND_FRAGMENT:
              mFragmentTransaction.replace(
                      android.R.id.content, 
                      mSecondFragment);
              break;
      }
      mFragmentTransaction.commit();
  
      return true;
  }
  </code></pre>
  
  <p>Thanks in advance!</p>