Comment aligner Flottant sur le Bouton d'Action pour le centre de

J'ai un FloatingActionButton. Je veux qu'il soit moyen de 2 LinearLayouts et le centre de l'écran comme ceci. Comment aligner Flottant sur le Bouton d'Action pour le centre de

Actuellement Ma conception, c'est comme cela

Comment aligner Flottant sur le Bouton d'Action pour le centre de

Je veux qu'il soit au centre de l'écran. Comment faire?

C'est tout mon code xml

<android.support.design.widget.CoordinatorLayout
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">
<LinearLayout android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <LinearLayout
        android:id="@+id/viewA"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1.6"
        android:orientation="horizontal"/>
    <LinearLayout
        android:id="@+id/viewB"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.2"
        android:orientation="horizontal"/>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:src="@drawable/ic_plus"
    app:layout_anchor="@id/viewA"
    android:layout_centerHorizontal="true"
    app:layout_anchorGravity="bottom"
    android:layout_centerInParent="true" />
Vous pouvez poster votre xml de mise en page?
J'ai édité la question. Tout mon code xml est-il
Ne app:layout_anchorGravity="center" travail?

OriginalL'auteur dev | 2015-08-20