So I'm trying to align two FloatingActionButtons in a LinearLayout inside a RelativeLayout.
Something like this:
<LinearLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/submitBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/DeleteBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
But I want them to behave like any other element like a TextView when you put them inside a LinearLayout.
I mean I want them each to take half of the LinearLayout's width.
But they would stick at the LinearLayout's start and they won't move no matter what I try.
I tried using android:layout_width="1" on each of them but no luck, they won't move at all they are just stuck together at the start of the LinearLayout.
Here's how it looks:
I would be so glad if there's any suggestions! Thanks in advance.


