I have 2 Floating Action Buttons on the screen. How can I make them rectangular?
I have 2 Floating Action Buttons on the screen. How can I make them rectangular?
One solution to make it square would be to use borderWidth
inserting 0dp
into its FloatingActionButton
. Then it would result in this:
app:borderWidth="0dp"
FloatingActionButton:
<android.support.design.widget.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
app:borderWidth="0dp"
android:id="@+id/fab_1"
android:layout_marginBottom="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:src="@drawable/abc_ic_clear_mtrl_alpha"/>
See the Gist code .