<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
<android.support.v7.widget.CardView
android:id="@+id/card_authentication_container"
style="@style/CardView"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_above="@id/button_authentication"
android:layout_gravity="center_horizontal|top"
android:layout_marginTop="32dp"
app:cardCornerRadius="10dp"
app:cardElevation="10dp">
</android.support.v7.widget.CardView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/float_button_authenticate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gamepad"
app:fabSize="mini"
app:layout_anchor="@id/card_authentication_container"
app:layout_anchorGravity="bottom|center_horizontal" />
</android.support.design.widget.CoordinatorLayout>
When I try to set floating action button on CardView with app:layout_anchorGravity="bottom|center_horizontal", it set under CardView.