title: Android Fragments NullPointerException error
body: <p>I'm trying to use the following code to open a <code>Fragment</code> that is inside another Fragment but is gives me a Null Pointer Exception with no cause.</p>
  
  <pre><code>Fragment newFragment = new SecondFragment(); 
  // consider using Java coding conventions (upper char class names!!!)
  FragmentTransaction transaction = getFragmentManager().beginTransaction();
  
  // Replace whatever is in the fragment_container view with this fragment,
  // and add the transaction to the back stack
  transaction.replace(R.id.menuitem_detail_container, newFragment);
  transaction.addToBackStack(null);
  
  // Commit the transaction
  transaction.commit(); 
  </code></pre>
  
  <p>This piece of code is inside a basic <code>onItemClickListener</code> inside the <code>onCreateView</code> method inside of a Fragment (<code>android.support.v4.app.Fragment</code>)</p>
  
  <p>Any ideas on what I might be doing wrong?</p>