Skip to content

Commit 86cd9d7

Browse files
imhappidrchen
authored andcommitted
[BottomSheet] Integrate tokens
PiperOrigin-RevId: 525177708
1 parent c8a0d47 commit 86cd9d7

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2023 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<selector
18+
xmlns:android="http://schemas.android.com/apk/res/android">
19+
<item android:color="@macro/m3_comp_sheet_bottom_docked_drag_handle_color"/>
20+
</selector>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Copyright (C) 2023 The Android Open Source Project
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
18+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:shape="rectangle">
20+
<size android:height="@dimen/m3_comp_sheet_bottom_docked_drag_handle_height" android:width="@dimen/m3_comp_sheet_bottom_docked_drag_handle_width" />
21+
<corners android:radius="2dp" />
22+
<solid android:color="@color/m3_bottom_sheet_drag_handle_color" />
23+
</shape>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<item name="android:minWidth">@dimen/mtrl_min_touch_target_size</item>
9696
<item name="android:minHeight">@dimen/mtrl_min_touch_target_size</item>
9797
<item name="android:paddingBottom">@dimen/m3_bottom_sheet_drag_handle_bottom_padding</item>
98-
<item name="srcCompat">@drawable/mtrl_bottomsheet_drag_handle</item>
98+
<item name="srcCompat">@drawable/m3_bottom_sheet_drag_handle</item>
9999
<item name="tint">@macro/m3_comp_sheet_bottom_docked_drag_handle_color</item>
100100
</style>
101101
</resources>

lib/java/com/google/android/material/bottomsheet/res/values/tokens.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@
2929
<macro name="m3_comp_sheet_bottom_docked_container_shape">?attr/shapeAppearanceCornerExtraLarge</macro>
3030
<!-- Enabled - Drag handle -->
3131
<macro name="m3_comp_sheet_bottom_docked_drag_handle_color">?attr/colorOnSurfaceVariant</macro>
32+
<dimen name="m3_comp_sheet_bottom_docked_drag_handle_width">32dp</dimen>
33+
<dimen name="m3_comp_sheet_bottom_docked_drag_handle_height">4dp</dimen>
3234

3335
</resources>

0 commit comments

Comments
 (0)