title: FragmentTabHost shows content in tab
body: <p><img src="https://i.stack.imgur.com/mnAgT.png" alt="enter image description here">im trying to set up a FragmentTabHost with 3 tabs. The problem im having is the content of each tab is actually being displayed in the tab tittle as well. Why is this happening? The layout for tab1 has a textview that says "Tab1" this is being displayed in the tab and not the content area. also if i change the background it changes the background of the tabs not the content area.</p>
  
  <p>xml:</p>
  
  <pre><code>  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;android.support.v4.app.FragmentTabHost
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@android:id/tabhost"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical" &gt;
  
              &lt;FrameLayout
                  android:id="@+id/realtabcontent"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/android.support.v4.app.FragmentTabHost&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>MAIN Fragment:</p>
  
  <pre><code>public class NewFragment _Frag extends Fragment{
      private FragmentTabHost mTabHost;
  
  
  
      Intent intent;
    boolean created = false;
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          //return super.onCreateView(inflater, container, savedInstanceState);
          if(container==null)
          {
              return null;
  
          }
            View v = inflater.inflate(R.layout.mylayout, container, false);
  
            mTabHost = (FragmentTabHost)v.findViewById(android.R.id.tabhost);
              mTabHost.setup(getActivity(), getChildFragmentManager(), R.id.realtabcontent);
  
  
  
              mTabHost.addTab(mTabHost.newTabSpec("fragmentb").setIndicator("Tab1"),
                        myclass1.class, null);
  
  
  
              mTabHost.addTab(mTabHost.newTabSpec("fragmentc").setIndicator("Tab2"),
                      myclass2.class, null);
              mTabHost.addTab(mTabHost.newTabSpec("fragmentd").setIndicator("Tab3"),
                      myclass3.class, null);
  
  
  
  
            return v;
      }
  </code></pre>