Skip to content

Commit 06bba00

Browse files
drchenafohrman
authored andcommittedMay 26, 2022
[Switch] Add associated text styles
Also increases the min height to match the min touch target size. PiperOrigin-RevId: 450987495
1 parent 109748e commit 06bba00

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
 

‎lib/java/com/google/android/material/materialswitch/res/values/dimens.xml

+1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
<dimen name="mtrl_switch_thumb_size">32dp</dimen>
2020
<dimen name="mtrl_switch_track_width">52dp</dimen>
2121
<dimen name="mtrl_switch_track_height">32dp</dimen>
22+
<dimen name="mtrl_switch_text_padding">16dp</dimen>
2223
</resources>

‎lib/java/com/google/android/material/materialswitch/res/values/styles.xml

+3
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@
2121
<item name="thumbTint">@color/mtrl_switch_thumb_tint</item>
2222
<item name="trackTint">@color/mtrl_switch_track_tint</item>
2323
<item name="trackDecorationTint">@color/mtrl_switch_track_decoration_tint</item>
24+
<item name="switchPadding">@dimen/mtrl_switch_text_padding</item>
25+
<item name="android:textAppearance">?attr/textAppearanceBodyMedium</item>
26+
<item name="android:minHeight">?attr/minTouchTargetSize</item>
2427
</style>
2528
</resources>

0 commit comments

Comments
 (0)
Please sign in to comment.