title: tabs are on top of my text in my xml
body: <p>I am using android TabHost in order to add tabs to my android Fragment. My issue is that the tabs are on top of my xml. I would think my fragment xml would automatically start under the tabs?</p>
  
  <p><img src="https://i.stack.imgur.com/eyICq.png" alt="enter image description here"></p>
  
  <p>My code for these tabs are:</p>
  
  <pre><code>public class StatisticsTab extends Fragment {
  
  
      private FragmentTabHost mTabHost;
  
      //Mandatory Constructor
      public StatisticsTab() {
      }
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
      }
  
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          View rootView = inflater.inflate(R.layout.fragment_tabs,container, false);
  
  
          mTabHost = (FragmentTabHost)rootView.findViewById(android.R.id.tabhost);
          mTabHost.setup(getActivity(), getChildFragmentManager(), R.id.realtabcontent);
  
          mTabHost.addTab(mTabHost.newTabSpec("fragmentb").setIndicator("Fragment B"),
                  StatisticsPage.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("fragmentc").setIndicator("Fragment C"),
                  BreweryStatistics.class, null);
          mTabHost.addTab(mTabHost.newTabSpec("fragmentd").setIndicator("Fragment D"),
                  StyleStatistics.class, null);
  
  
          return rootView;
      }
  
  
  
  
  }
  </code></pre>
  
  <p>and here is the code for one of my fragments in the tab:</p>
  
  <pre><code>public class StyleStatistics extends Fragment implements GetStyleStatisticsJSON.OnArticleSelectedListener {
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View v = inflater.inflate(R.layout.style_statistics_layout, container, false);
  
          SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
          String userName = prefs.getString("userName", null);
          String userID = prefs.getString("userID", null);
  
  
          String url = "myURL";
  
          //async task to get beer taste tag percents
          GetStyleStatisticsJSON task = new GetStyleStatisticsJSON(getActivity());
          task.setOnArticleSelectedListener(this);
          task.execute(url);
  
          // Inflate the layout for this fragment
          return v;
  
      }
  
  
      @Override
      public void onArticleSelected(String bID){
  
          //code to execute on click
          Fragment Fragment_one;
          FragmentManager man= getFragmentManager();
          FragmentTransaction tran = man.beginTransaction();
          Fragment_one = new StylePage2();
          final Bundle bundle = new Bundle();
          bundle.putString("beerIDSent", bID);
          Fragment_one.setArguments(bundle);
          tran.replace(R.id.main, Fragment_one);//tran.
          tran.addToBackStack(null);
          tran.commit();
  
      }
  
  
  }
  </code></pre>
  
  <p>and here is the code for the fragments xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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;TextView
          android:id="@+id/styleStatsTitle"
          android:gravity="center"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:ems="10"
          android:text="Your Top Styles"
          android:textSize="20sp"
          android:textStyle = "bold"
          android:padding="5dip"
          &gt;
      &lt;/TextView&gt;
  
      &lt;ListView
          android:id="@+id/yourStyleStatistics"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:dividerHeight="0px"
          android:divider="@null"
  
          &gt;
      &lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>fragment_tab.xml :</p>
  
  <pre><code>&lt;android.support.v4.app.FragmentTabHost
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@android:id/tabhost"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
      &lt;LinearLayout
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"&gt;
  
          &lt;FrameLayout
              android:id="@+id/realtabcontent"
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:layout_weight="1"/&gt;
  
  
  
  
  
      &lt;/LinearLayout&gt;
  &lt;/android.support.v4.app.FragmentTabHost&gt;
  </code></pre>