title: Adding Fragments Dynamically
body: <p>I am thoroughly confused.  According to <a href="http://developer.android.com/guide/components/fragments.html">this</a>
  and <a href="http://www.intertech.com/Blog/programmatically-working-with-android-fragments/">this</a> and numerous other sources, both on SO and elsewhere, I should be able to do the following:</p>
  
  <pre><code>import android.os.Bundle;
  import android.app.Activity;
  import android.app.FragmentTransaction;
  import android.view.Menu;
  
  public class MainScreenActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main_screen);
      MainRightFragment mrf = new MainRightFragment();
      RecommendedFragment rf = new RecommendedFragment();
  
      FragmentTransaction ft = getFragmentManager().beginTransaction();
      ft.add(R.id.main_search_boxes, mrf, "fragmentright");
      ft.add(R.id.main_left_side, rf, "fragmentreccomend");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The R.id references point to FrameLayout objects in my .xml file.  Why am I still getting the "<em>The method add(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, RecommendedFragment, String)</em>" error message?</p>