title: Replacing fragments in an activity not calling onAttach, onCreate, onCreateView, etc
body: <p>So I have this piece of code here, I am creating a new Fragment and replacing it with another fragment. That works well. However I have notice that on the first line the constructor is being called but the <code>onAttach()</code>, <code>onCreate()</code> etc are not. If I were to uncomment the second line it won't work as <code>updateItem(URL)</code> requires a webView that is initiated in the onCreate() function.</p>
  
  <pre><code>DetailViewFragment detailFragment = new DetailViewFragment();
  //detailFragment.updateItem(URL);
  FragmentTransaction ft = getFragmentManager().beginTransaction();
  ft.replace(R.id.displayList, detailFragment);
  ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
  ft.addToBackStack(null);
  ft.commit();
  </code></pre>
  
  <p>Would appreciate any help that will get that to work with the second line uncommented.</p>