You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across multiple issues when using the silder on different platforms. While it works great on iOS and web, I am encountering following issues on android only:
too many steps
There is one extra tick/step added to the right/maximum end of the slider without any value change ?!
disabling removes minimumTrackTintColor
When disabling the slider the minimumTrackTintColor is removed/ignored ?!
extra space before and after the trackbar
There is extra space before and after the trackbar added. But I managed to apply the following workaround:
style={{marginHorizontal: (Platform.OS != 'android') ? 0 : -15}}
Hello @Chriko2502, thanks for reaching out!
Let me address those concerns one by one:
Too many steps
Yes, this looks like a bug in how the values for the steps are calculated and compared. Thank you for noticing that!
Disabling removes the minimumTrackTintColor
This, unfortunately, is a default behavior of Slider and is not planned to be changed.
This Slider package exposes the Slider and SeekBar of iOS and Android native implementation with all of their behaviors and system-specifics, including the design of disabled Slider.
Workaround for the 1.
You asked for a solution or workaround for these, so for the 1. problem, before a fix is implemented, you can simply use values of integer, just like so:
Regarding 1: Indeed changing from floats to integers solved the problem. Thanks for pointing out!
Regarding 2: Seems the default behaviour on iOS is the one, which I expected, the one from android seems not user friendly to me. Again thanks for clarification, I will create a workaround by disabling touch events on parent elements.
Regarding 3: yes saw the linked issue as well but since there was no update, just wanted to clarify if I might missed something.
My points are clarified and the issue can be closed. If you would like to keep it open to follow up on "Problem 1"....
Hi together,
I came across multiple issues when using the silder on different platforms. While it works great on iOS and web, I am encountering following issues on android only:
too many steps
There is one extra tick/step added to the right/maximum end of the slider without any value change ?!
disabling removes minimumTrackTintColor
When disabling the slider the minimumTrackTintColor is removed/ignored ?!
extra space before and after the trackbar
There is extra space before and after the trackbar added. But I managed to apply the following workaround:
style={{marginHorizontal: (Platform.OS != 'android') ? 0 : -15}}
All issues can be reproduced/seen in:
https://snack.expo.dev/@chr1k0/slider-example
Any possibility to fix problem 1. and 2. or is there any known workaround?
Thanks in advance!
The text was updated successfully, but these errors were encountered: