title: Android FrameLayout use to load Fragment appears to live outside of parent LinearLayout
body: <p>In android I have LinearLayout inside a ScrollView.<br>
  Nested in the LinearLayout are TextView, Other LinearLayouts etc..
  I also have a FrameLayout used to load a Fragment</p>
  
  <p>When the Fragment gets loaded it does not appears to live inside the LinearLayout inside the ScrollView.
  Scrolling the screen has no affect on the position of the elements within the FrameLayout.</p>
  
  <p>In the code below.  The line  is the FrameLayout that is loaded by a FragmentManager.  For some reason the button loaded in the FrameLayout Appears to be an overlay above the rest of the activity.  It does not moved when scrolled.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_marginBottom="16dp"
      android:layout_marginTop="16dp"
      android:background="#ffffff"
      tools:context="org.glucosio.android.fragment.OverviewFragment"
      tools:ignore="MissingPrefix"&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:paddingBottom="@dimen/fab_size_normal"&gt;
  
          &lt;TextView
              android:layout_width="fill_parent"
              android:layout_height="2px"
              android:background="#DADADA" /&gt;
  
          &lt;TextView
              fontPath="fonts/lato-bold.ttf"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_marginTop="16dp"
              android:paddingLeft="16dp"
              android:paddingRight="16dp"
              android:text="@string/tab_tips"
              android:textColor="@color/glucosio_text" /&gt;
  
          &lt;TextView
              android:id="@+id/random_tip_textview"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="64dp"
              android:layout_marginTop="8dp"
              android:paddingLeft="16dp"
              android:paddingRight="16dp"
              android:text="Always bring a banana to a party, Rose, bananas are good!"
              android:textColor="@color/glucosio_text" /&gt;
  
          &lt;FrameLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="bottom"&gt;
               &lt;Button
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:text="afdafsafsadsaf "/&gt;
          &lt;/FrameLayout&gt; 
  
          &lt;!--  LOADED BY FRAGMENT MANAGER --&gt;
          &lt;FrameLayout
              android:id="@+id/chci_fragment_holder"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" &gt;
          &lt;/FrameLayout&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  
  
  
  // Here is the Fragment xml
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="horizontal" &gt;
  
      &lt;Button
          android:id="@+id/button1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Button" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>