Closed
Description
Description: Connected button groups affect adjacent buttons.
video.mp4
Expected behavior: Connected button groups don't affect adjacent buttons.
https://m3.material.io/components/button-groups/guidelines:
Standard button groups ... When a button in a standard group is selected:
- The selected button changes shape and width
- A selected toggle button also changes color
- Adjacent buttons move and temporarily change width
Connected button groups ...
They behave similarly to standard groups, except they don't affect adjacent buttons.
<com.google.android.material.button.MaterialButtonGroup
android:id="@+id/buttonGroup"
style="@style/Widget.Material3.MaterialButtonGroup.Connected"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
style="?attr/materialButtonOutlinedStyle"
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 1"
/>
<Button
style="?attr/materialButtonOutlinedStyle"
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 2"
/>
<Button
style="?attr/materialButtonOutlinedStyle"
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button 3"
/>
</com.google.android.material.button.MaterialButtonGroup>
Minimal sample app repro: Test16.zip
Android API version: 34
Material Library version: 1.13.0-alpha13 and 1.14.0-alpha01
Device: Android Emulator 35.5.10