title: Frament transaction with list fragment
body: <p>I am trying to implement a navigation drawer. "Fragment1" is a list fragment:</p>
  
  <pre><code>public class Fragment1 extends ListFragment {
  private List&lt;String&gt; musicList;
  
  public static ListFragment newInstance(Context context) {
      Fragment1 f = new Fragment1();
  
      return f;
  }
  </code></pre>
  
  <p>However i cannot use the fragmenttransaction to replace the fragments in the main activity:</p>
  
  <pre><code>public class MainActivity extends AbstractNavDrawerActivity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      if ( savedInstanceState == null ) {
          getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, new Fragment1()).commit();
      }
  }
  
  
  @Override
  protected void onNavItemSelected(int id) {
      switch ((int)id) {
      case 101:
          getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, new Fragment1()).commit();
          break;
      case 102:
          getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, new Fragment2()).commit();
          break;
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The replace method has a redline under it and says:</p>
  
  <blockquote>
    <p>The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, Fragment1)"</p>
  </blockquote>
  
  <p>What should i do?</p>