If i am trying to add margin with layout_marginStart or layout_marginEnd but there is no effect on UI. I am not sure why layout_marginStart, layout_marginEnd not working with MaterialButton when i add them as the child of MaterialButtonToggleGroup
<com.google.android.material.button.MaterialButtonToggleGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/ten_dp"
app:singleSelection="true">
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/twentY"
app:icon="@drawable/ic_directions_walk_black_24dp" />
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/ten_dp"
app:icon="@drawable/ic_directions_car_black_24dp" />
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/ten_dp"
app:icon="@drawable/ic_directions_bus_black_24dp" />
</com.google.android.material.button.MaterialButtonToggleGroup>