6
I have 2 Floating Action Buttons on screen. How can I make them rectangular?
6
I have 2 Floating Action Buttons on screen. How can I make them rectangular?
7
One solution to make it square would be to use borderWidth
inserting 0dp
for your FloatingActionButton
. Then it would result in:
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 code in Gist.
Browser other questions tagged android android-layout
You are not signed in. Login or sign up in order to post.
As far as Fab know are always round, I’ve used a cardview with a button to simulate the effect.
– Lucas Queiroz Ribeiro