title: FAB improperly placed temporarily?
body: <p>I have a FAB anchored to a LinearLayout. It is correctly positioned in the Android Studio preview. When the fragment is first loaded, the FAB is not located in the correct position (the one in the preview from AS). Certain actions after the initial creation of the Fragment then cause the FAB to move to the correct location (focusing an EditText, going to a new Activity and returning, etc.).</p>
  
  <p>Incorrect placement:
  <a href="https://i.stack.imgur.com/rMshr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rMshr.png" alt="Incorrect placement"></a></p>
  
  <p>Correct placement:
  <a href="https://i.stack.imgur.com/d125K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d125K.png" alt="enter image description here"></a></p>
  
  <p>Here is my layout XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout 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"&gt;
  
          &lt;LinearLayout
              android:id="@+id/input_layout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"&gt;
  
              &lt;LinearLayout
                  android:id="@+id/top"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical"
                  android:paddingBottom="@dimen/activity_vertical_margin"
                  android:paddingLeft="@dimen/activity_horizontal_margin"
                  android:paddingRight="@dimen/activity_horizontal_margin"
                  android:paddingTop="@dimen/activity_vertical_margin"
                  app:layout_behavior="@string/appbar_scrolling_view_behavior"
                  tools:context=".ui.main.MainFragment"&gt;
  
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:text="@string/distance"
                      android:textStyle="bold"/&gt;
  
                  &lt;LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"&gt;
                      &lt;EditText
                          android:layout_width="60dp"
                          android:layout_height="40dp"
                          android:inputType="number" /&gt;
                      &lt;TextView
                          android:layout_width="wrap_content"
                          android:layout_height="40dp"
                          android:id="@+id/meas_unit"
                          tools:text="ft"/&gt;
                      &lt;SeekBar
                          android:id="@+id/distance_seekbar"
                          android:layout_width="0dp"
                          android:layout_height="40dp"
                          android:max="95"
                          android:progress="25"
                          android:background="@null"
                          android:layout_weight="1"/&gt;
                  &lt;/LinearLayout&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;View
                  android:layout_width="match_parent"
                  android:layout_height="1dp"
                  android:background="@android:drawable/divider_horizontal_bright" /&gt;
  
              &lt;LinearLayout
                  android:id="@+id/bottom"
                  android:layout_width="match_parent"
                  android:layout_height="0dp"
                  android:layout_weight="1"
                  android:orientation="vertical"
                  android:paddingBottom="@dimen/activity_vertical_margin"
                  android:paddingLeft="@dimen/activity_horizontal_margin"
                  android:paddingRight="@dimen/activity_horizontal_margin"
                  android:paddingTop="@dimen/activity_vertical_margin"
                  app:layout_behavior="@string/appbar_scrolling_view_behavior"
                  android:elevation="6dp"
                  tools:context=".ui.main.MainFragment"&gt;
  
                  &lt;TextView
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:text="@string/putters"
                      android:textStyle="bold"/&gt;
  
              &lt;/LinearLayout&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:orientation="horizontal"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="bottom"
              android:layout_alignParentTop="false"
              android:layout_alignParentEnd="false"
              android:layout_alignParentBottom="true"
              android:gravity="center"
              android:layout_alignWithParentIfMissing="false"
              android:layout_alignParentRight="false"
              android:elevation="6dp"&gt;
  
              &lt;Button
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="New Button"
                  android:id="@+id/button3"
                  android:layout_gravity="center_vertical" /&gt;
  
              &lt;Button
                  android:layout_width="127dp"
                  android:layout_height="wrap_content"
                  android:text="New Button"
                  android:id="@+id/button4" /&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/fab"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_margin="16dp"
          android:clickable="true"
          android:src="@drawable/ic_person_add_24dp"
          app:layout_anchor="@id/top"
          app:layout_anchorGravity="bottom|right|end"
          android:tint="@android:color/white"/&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>I don't recall having this issue in older versions of Android supprt design library, it seems to have surfaced when I updated <code>com.android.support:design:23.1.1</code> to <code>com.android.support:design:24.2.1</code>.</p>