Skip to content

Commit 861ec3f

Browse files
manabu-nakamurapekingme
authored andcommitted
[Catalog] Use wrap overflowMode for button groups in theme picker
Resolves #4926 - c6ded3d by manabu-nakamura <ma.nakamura@gmail.com> PiperOrigin-RevId: 830954339
1 parent 0e17248 commit 861ec3f

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

catalog/java/io/material/catalog/preferences/res/layout/mtrl_preferences_dialog_option_button.xml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
16-
<Button
17-
xmlns:android="http://schemas.android.com/apk/res/android"
18-
xmlns:app="http://schemas.android.com/apk/res-auto"
16+
<Button xmlns:android="http://schemas.android.com/apk/res/android"
1917
style="?attr/materialButtonTonalStyle"
2018
android:layout_width="wrap_content"
2119
android:layout_height="wrap_content"
22-
android:paddingLeft="8dp"
23-
android:paddingRight="12dp"
24-
android:minWidth="0dp"
25-
app:iconPadding="4dp"
26-
app:materialSizeOverlay="@style/SizeOverlay.Material3Expressive.Button.Xsmall"/>
20+
android:layout_gravity="start|top"
21+
android:paddingStart="12dp"
22+
android:paddingEnd="12dp"
23+
android:minWidth="0dp" />

catalog/java/io/material/catalog/preferences/res/layout/mtrl_preferences_dialog_preference.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
xmlns:app="http://schemas.android.com/apk/res-auto"
1919
android:layout_width="match_parent"
2020
android:layout_height="wrap_content"
21-
android:gravity="center_horizontal"
2221
android:orientation="vertical"
2322
android:paddingTop="8dp"
2423
android:paddingBottom="8dp">
@@ -32,10 +31,11 @@
3231

3332
<com.google.android.material.button.MaterialButtonToggleGroup
3433
android:id="@+id/preference_options"
35-
android:layout_width="wrap_content"
34+
android:layout_width="match_parent"
3635
android:layout_height="wrap_content"
3736
android:layout_marginBottom="8dp"
3837
app:selectionRequired="true"
39-
app:singleSelection="true" />
38+
app:singleSelection="true"
39+
app:overflowMode="wrap" />
4040

4141
</LinearLayout>

0 commit comments

Comments
 (0)