title: missing parameter when creating a Fragment
body: <p>In my first attempt to work with <code>Fragments</code>, the method <code>replace</code> gives this error <code>The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, LM_Fragment)</code> I supplied the <code>id</code> of the first <code>fragment</code> which is <code>lm_fragment</code> as the first parameter for <code>.replace</code> method. is that correct? if not what parameter should I supply <code>.replace</code> method with? </p>
  
  <p>MainActivity:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      Configuration config = getResources().getConfiguration();
  
        FragmentManager fragmentManager = getFragmentManager();
        FragmentTransaction fragmentTransaction = 
        fragmentManager.beginTransaction();
  
        if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
           LM_Fragment lm_fragment = new LM_Fragment();
           fragmentTransaction.replace(R.id.lm_fragment, lm_fragment);
        }else{
           PM_Fragment pm_fragment = new PM_Fragment();
           fragmentTransaction.replace(R.id.pm_fragment, pm_fragment);
        }
        fragmentTransaction.commit();
     }
  </code></pre>
  
  <p>MainActivity xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="horizontal"&gt;
  
       &lt;fragment
          android:name="com.example.fragments"
          android:id="@+id/lm_fragment"
          android:layout_weight="1"
          android:layout_width="0dp"
         android:layout_height="match_parent" /&gt;
  
      &lt;fragment
          android:name="com.example.fragments"
          android:id="@+id/pm_fragment"
          android:layout_weight="2"
          android:layout_width="0dp"
          android:layout_height="match_parent" /&gt;
  </code></pre>
  
  <p></p>