title: Android Floating Action Button doesn't get fixed at the bottom
body: <p>I have a fragment which renders a recycleview with an floating action button. The problem is that when the list is empty, the fab keeps on the right top, when the list has few items, the fab keeps below the list but not at the bottom, and it only keeps totally at the bottom when the list fill the screen with items. Could somebody help me please? Bellow is my code:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;com.app.juninho.financeapp.activity.FuncionarioActivity&quot;&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id=&quot;@+id/funcionario_recycler_view&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          android:scrollbars=&quot;vertical&quot; /&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id=&quot;@+id/btn_add_func&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_gravity=&quot;bottom|right|end&quot;
          android:layout_alignParentBottom=&quot;true&quot;
          android:layout_alignParentEnd=&quot;true&quot;
          android:layout_alignParentRight=&quot;true&quot;
          android:layout_margin=&quot;16dp&quot;
          android:src=&quot;@drawable/ic_menu_send&quot;
          app:layout_behavior=&quot;com.app.juninho.financeapp.utils.ScrollAwareFABBehavior&quot; /&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  <p>if the list is empty, fab keeps at the top, which is wrong:<br />
  <a href="https://i.stack.imgur.com/O10vd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O10vd.jpg" alt="if the list is empty, fab keeps at the top, which is wrong" /></a></p>
  <p>if the list has a few items, fab doesn't keep totally at the bottom:<br />
  <a href="https://i.stack.imgur.com/W9I14.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W9I14.jpg" alt="if the list has a few items, fab doesn't keep totally at the bottom" /></a></p>
  <p>Here is the correct way, fab is at the bottom:<br />
  <a href="https://i.stack.imgur.com/FYPjh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FYPjh.jpg" alt="Here is the correct way, fab is at the bottom" /></a></p>
  <p>Using RelativeLayout it seems to work, but its too at the right/bottom corner:<br />
  <a href="https://i.stack.imgur.com/j9zAV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j9zAV.jpg" alt="Using RelativeLayout it seems to work, but its too at the right/bottom corner" /></a></p>