title: Reset/reload fragment container
body: <p>How can I reset or reload a fragment container, to make it empty.
  I have a master detail view and I want to reset the detail container to empty on a menu item click.This works in some cases and does not in some.</p>
  
  <pre><code> NullFragment fragment = new NullFragment();
   FragmentManager fragmentManager = getFragmentManager();
   FragmentTransaction fragmentTransaction = fragmentManager
          .beginTransaction();
   fragmentTransaction.replace(R.id.item_detail_container,
   fragment);
   int count = fragmentManager.getBackStackEntryCount();
   fragmentManager.popBackStackImmediate(count, 0);
   fragmentTransaction.commit();
  </code></pre>