I'm trying to add the new(ish) android.support.design.widget.FloatingActionButton to my project but I'm having some difficulty. On pre-lollipop devices, the action button looks fine. On lollipop devices, it's docked to the bottom of the window, which means it is halfway cut off by the navigation bar at the bottom.
Note that I'm trying to add a FAB similar to the Gmail app where it is docked to the bottom right corner of the screen.
What I'm I doing wrong? My XML file:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_color"
android:longClickable="true"
android:choiceMode="multipleChoice" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="60dp"
android:layout_height="60dp"
app:borderWidth="0dp"
android:layout_margin="@dimen/fab_margin"
android:elevation="44dp"
android:clickable="true"
android:onClick="onAddButtonClick"
android:src="@drawable/ic_fab"
android:layout_gravity="bottom|right|end"
android:adjustViewBounds="false"
android:baselineAlignBottom="true" />
</android.support.design.widget.CoordinatorLayout>
</ScrollView>