title: Replacing ListFragments with "fragmentManager.beginTransaction().replace"
body: <p>I've just started properly working with Fragments. I'm building an app that uses a drawerlayout and am trying to tweak google PlanetFragment example app just to see how it works.</p>
  
  <p>I think I'm there but I'm using a listfragment no just a fragment as the original app is using.</p>
  
  <p>The code below both has the google code commented and mine below. The content_frame id it refers to is a framelyout it replaces. Should I use a linear layout there?</p>
  
  <p>The error it gives is it says I'm using a listfragment where fragment manager desires a normal fragment. I couldn't find anything that says this method shouldn't work with listfragments...</p>
  
  <pre><code>//        // update the main content by replacing fragments
  //        Fragment fragment = new PlanetFragment();
  //        Bundle args = new Bundle();
  //        args.putInt(PlanetFragment.ARG_PLANET_NUMBER, position);
  //        fragment.setArguments(args);
  //
  //        FragmentManager fragmentManager = getFragmentManager();
  //        fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();
  
          ListFragment fragment = new MyCategoryFragment();
          Bundle args = new Bundle();
  
          FragmentManager fragmentManager = getFragmentManager();
          fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();
  </code></pre>