title: set a fragment dynamically
body: <p>I have a FragmentActivty where its layout is composed by a LinearLayout with some buttons at the half-left, and a empty container FrameLayout at the half-right where I want to insert other activities (Maybe they should be fragments instead of activities).</p>
  
  <p>Depending the button I touch, it will call one activity/fragment and this will be displayed on the container framelayout.</p>
  
  <p>For this I have:</p>
  
  <p><strong>Main.java</strong></p>
  
  <pre><code>public class Main extends FragmentActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  </code></pre>
  
  <p><strong>main.xml</strong></p>
  
  <pre><code>&lt;RelativeLayout     
  
  &lt;!-- Buttons containing layout --&gt;    
  &lt;LinearLayout 
  
      &lt;Button
          ... /&gt;
      ...
  
  &lt;/LinearLayout&gt;
  
  &lt;!-- Blank space which will contain other activities --&gt;
  &lt;FrameLayout
      android:id="@+id/activitycontent"
      ...&gt;    
  &lt;/FrameLayout&gt;   
  </code></pre>
  
  <p></p>
  
  <p>This is a example of a activity/frament to set dinamically on the container framelayout:</p>
  
  <p><strong>Content1.java</strong></p>
  
  <pre><code>public class Content1 extends Fragment {
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      /**Inflate the layout for this fragment*/
      return inflater.inflate(R.layout.content1, container, false);
  }
  
  @Override
  public void onActivityCreated(Bundle state) {
      super.onActivityCreated(state);
  </code></pre>
  
  <p><strong>So, the question is</strong>:  <em>How can I define the framelayout as a container for content1 activity/frament, and how I set it? (Remembering that I call to the activty/fragment when I touch the button)</em></p>