Adding a button on the baseline of a layout

287 Views Asked by At

How to place a button on the baseline of a layout as shown in the image below

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER
 <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.v7.widget.CardView
            android:id="@+id/cardView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:cardCornerRadius="7dp"
            app:cardElevation="22dp">


        </android.support.v7.widget.CardView>

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_anchor="@+id/cardView"
            app:srcCompat="@drawable/ic_facebook"
            app:layout_anchorGravity="center|bottom" />

    </android.support.design.widget.CoordinatorLayout>