-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android multiple issues: too many steps, disabling removes minimumTrackTintColor, extra space #634
Comments
Hello @Chriko2502, thanks for reaching out!
Workaround for the 1. <Slider
//style={{marginHorizontal: (Platform.OS != 'android') ? 0 : -15}}
disabled={false} //true
minimumValue={80}
maximumValue={120}
step={5}
value={100}
onValueChange={(value) => {
setFontSize(value/100)
}}
tapToSeek={true}
thumbTintColor={'grey'}
minimumTrackTintColor={'blue'}
maximumTrackTintColor={'grey'}
/> ☝️ I checked this on the snack you sent, and using integers works as expected. The rest of the code is as you implemented. |
Hi @BartoszKlonowski, thanks for your quick reply! 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".... Thanks! |
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: