Skip to content

Commit 8187bd0

Browse files
committed
fix(android): slider fixes
1 parent 4363c72 commit 8187bd0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/slider/slider.android.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,26 @@ export class Slider extends View {
105105
if (color) {
106106
this.nativeViewProtected.setTrackTintList(sliderGetEnabledColorStateList(color));
107107
if (!this.trackBackgroundColor) {
108-
this.trackBackgroundColor = new Color(61.2, color.r, color.g, color.b);
108+
this[trackBackgroundColorProperty.setNative](new Color(61.2, color.r, color.g, color.b));
109109
}
110110
} else {
111111
this.nativeViewProtected.setTrackTintList(null);
112112
if (!this.trackBackgroundColor) {
113113
this.trackBackgroundColor = null;
114+
this[trackBackgroundColorProperty.setNative](null);
115+
// } else {
116+
// this[trackBackgroundColorProperty.setNative](this.trackBackgroundColor);
114117
}
115118
}
116119

117120
// if (!this.trackFillColor) {
118121
// this.trackFillColor = color;
119122
// }
120123
if (!this.thumbColor) {
121-
this.thumbColor = color;
124+
this[thumbColorProperty.setNative](color);
125+
if (!this.rippleColor) {
126+
this[rippleColorProperty.setNative](color);
127+
}
122128
} else {
123129
// trackFillColor overrides also the thumbColor
124130
this[thumbColorProperty.setNative](this.thumbColor);
@@ -188,7 +194,7 @@ export class Slider extends View {
188194
[thumbColorProperty.setNative](color: Color) {
189195
this.nativeViewProtected.setThumbTintList(sliderGetEnabledColorStateList(color));
190196
if (!this.rippleColor) {
191-
this.rippleColor = color;
197+
this[rippleColorProperty.setNative](color);
192198
} else {
193199
// trackFillColor overrides also the thumbColor
194200
this[rippleColorProperty.setNative](this.rippleColor);

0 commit comments

Comments
 (0)