Luca
Luca

Reputation: 67

Floating Action Button rectangular shaped (round corners) with text

I was wondering whether it could be possible to create a fab like this shown in this image from material.io and how to create it. Thanks

enter image description here

Upvotes: 1

Views: 6231

Answers (1)

Prexx
Prexx

Reputation: 2979

Try this:

<com.google.android.material.button.MaterialButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:icon="@drawable/ic_play_white"
    app:cornerRadius="20dp"
    android:text="Test" />

Upvotes: 2

Related Questions