title: FragmentActivity switching error... "Incompatible types" or "FragmentTransaction cannot be applied"
body: <p>I needed to downgrade my Interface from 4.x to 2.3.x.
  The 4.x Interface was designed with Fragments and was working. To downgrade it, I changed them to FragmentActivties, switched everything to the needed android Support v4 version. 
  The problem is, the Fragment switch is not working.</p>
  
  <p><strong>Imports are:</strong></p>
  
  <pre><code>import android.support.v4.app.FragmentTransaction;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.Fragment;
  import android.support.v7.app.ActionBarActivity;
  </code></pre>
  
  <p>Error Code is the <strong>ft.replace(..)</strong>, basically it says I need a Fragment there, not the MealsFragment.</p>
  
  <pre><code>   @Override
     public void onClick(DialogInterface dialog, int which) {
  
              MealsFragment newFragment = null;
              FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
              if (which == 0) {
                  Log.e("CLick", "CLICKED");
                  newFragment = newMealsFragment();
                  MealsFragment.meals = 1;
  
              } else if (which == 1) {
                  changeFragment1 = new MeasurementFragment();
                  MeasurementFragment.dia = 1;
              }
  
              ft.replace(R.id.fl_content_frame, newFragment);
              ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
              ft.commit();
          }
  
      });
  </code></pre>
  
  <p><strong>Error in AndroidStudio:</strong></p>
  
  <pre><code>replace(int, android.support.v4.app.Fragment) in FragmentTransition cannot be applied to (int, xx.xx.xx.ui.MealsFragment)
  </code></pre>
  
  <p>MealsFragment is an FragmentActivty</p>
  
  <p><strong>Logcat:</strong></p>
  
  <pre><code>error: no suitable method found for replace(int,MealsFragment)
  method FragmentTransaction.replace(int,Fragment,String) is not applicable
  (actual and formal argument lists differ in length)
  method FragmentTransaction.replace(int,Fragment) is not applicable
  (actual argument MealsFragment cannot be converted to Fragment by method invocation conversion)
  </code></pre>
  
  <p>If i change the newFragment to</p>
  
  <pre><code>android.support.v4.app.Fragment newFragment = null;
  </code></pre>
  
  <p>The new error <strong>incompatible types</strong> occures. I'm switching between those two errors, but I can't get a solution.</p>