title: how to change fragment's class dynamically
body: <p>Hi I have a linearLayout containing two fragments and I add tabs with code to this layout. What I want is when I click tab1 it is ok to fragment fill itself from indicated class, but in tab2 I want to change this class to another class. Thank you</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="horizontal"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/frags"&gt;
  
     &lt;fragment class="com.tugce.MitsActionBar.DoktorlarFragment"
              android:id="@+id/frag_title"
              android:visibility="gone"
              android:layout_marginTop="?android:attr/actionBarSize"
              android:layout_width="@dimen/titles_size"
              android:layout_height="match_parent" /&gt; 
  
      &lt;fragment class="com.tugce.MitsActionBar.ContentFragment"
              android:id="@+id/frag_content"
              android:layout_width="match_parent"
              android:layout_height="match_parent" /&gt;
  </code></pre>