File tree 4 files changed +47
-4
lines changed
lib/java/com/google/android/material/slider
4 files changed +47
-4
lines changed Original file line number Diff line number Diff line change @@ -1750,7 +1750,6 @@ public void setTrackActiveTintList(@NonNull ColorStateList trackColor) {
1750
1750
}
1751
1751
trackColorActive = trackColor ;
1752
1752
activeTrackPaint .setColor (getColorForState (trackColorActive ));
1753
- stopIndicatorPaint .setColor (getColorForState (trackColorActive ));
1754
1753
invalidate ();
1755
1754
}
1756
1755
@@ -2838,7 +2837,7 @@ protected void drawableStateChanged() {
2838
2837
activeTrackPaint .setColor (getColorForState (trackColorActive ));
2839
2838
inactiveTicksPaint .setColor (getColorForState (tickColorInactive ));
2840
2839
activeTicksPaint .setColor (getColorForState (tickColorActive ));
2841
- stopIndicatorPaint .setColor (getColorForState (trackColorActive ));
2840
+ stopIndicatorPaint .setColor (getColorForState (tickColorInactive ));
2842
2841
for (TooltipDrawable label : labels ) {
2843
2842
if (label .isStateful ()) {
2844
2843
label .setState (getDrawableState ());
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ ~ Copyright (C) 2021 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 xmlns : android =" http://schemas.android.com/apk/res/android" >
18
+ <item android : color =" ?attr/colorOnPrimary" android : state_enabled =" true" />
19
+ <!-- When disabled, the tick marks over active track should be the same color as the inactive track. -->
20
+ <item android : alpha =" @dimen/m3_comp_slider_disabled_inactive_track_opacity"
21
+ android : color =" @macro/m3_comp_slider_disabled_inactive_track_color" />
22
+ </selector >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!--
3
+ ~ Copyright (C) 2021 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 xmlns : android =" http://schemas.android.com/apk/res/android" >
18
+ <item android : color =" ?attr/colorOnSecondaryContainer" android : state_enabled =" true" />
19
+ <!-- When disabled, the tick marks over inactive track should be the same color as the active track. -->
20
+ <item android : alpha =" @dimen/m3_comp_slider_disabled_active_track_opacity"
21
+ android : color =" @macro/m3_comp_slider_disabled_active_track_color" />
22
+ </selector >
Original file line number Diff line number Diff line change 61
61
<item name =" haloColor" >#00FFFFFF</item >
62
62
<item name =" labelStyle" >@style/Widget.Material3.Slider.Label</item >
63
63
<item name =" thumbColor" >@color/m3_slider_thumb_color</item >
64
- <item name =" tickColorActive" >@color/m3_slider_inactive_track_color </item >
65
- <item name =" tickColorInactive" >@color/m3_slider_active_track_color </item >
64
+ <item name =" tickColorActive" >@color/m3_slider_active_tick_marks_color </item >
65
+ <item name =" tickColorInactive" >@color/m3_slider_inactive_tick_marks_color </item >
66
66
<item name =" tickRadiusActive" >@null</item >
67
67
<item name =" tickRadiusInactive" >@null</item >
68
68
<item name =" trackColorActive" >@color/m3_slider_active_track_color</item >
You can’t perform that action at this time.
0 commit comments