title: Why is fragment calling OnCreate / OnCreateView when using fragment transactions with FrameLayout?
body: <p>The main page of my application has a FrameLayout. </p>
  
  <p>I'm instantiating two fragments when the activity starts, and I'm trying to use a menu button to swap between the fragment.</p>
  
  <pre><code>scanHistoryFrag = new HistoryFragment();
  scanFrag = new ScanFragment();
  </code></pre>
  
  <p>I never replace these objects - I use the same ones throughout the lifecycle of the application. However, when I swap them in my FrameLayout...</p>
  
  <pre><code>private void ChangeFragment(Android.Support.V4.App.Fragment fragment)
  {
      Android.Support.V4.App.FragmentTransaction ft = SupportFragmentManager.BeginTransaction();
      ft.Replace(Resource.Id.fragmentContainer, fragment);
      ft.Commit();
  }
  </code></pre>
  
  <p>OnCreate and OnCreateView are called on the Fragment again... which means any adjustments I made post creation on that fragment are overwritten with initial values again. I can't seem to find any explanation for why this is happening or how I might avoid it.</p>
  
  <p>The ChangeFragment method is being called by OnOptionsItemSelected, as I'm using a menu button to toggle them.</p>