githuboftigran / rn-range-slider

A native slider with range
MIT License
237 stars 133 forks source link

Sliding on Android doesn't work #12

Closed byonghun closed 5 years ago

byonghun commented 5 years ago

On Android, the slider doesn't work as intended. The only way the range slider moves is by clicking. Works perfectly fine on iOS.

Can you help me resolve this?

Currently, I am on react: ^16.6.0-alpha.8af6728 and rn-range-slider: ^1.1.2.

githuboftigran commented 5 years ago

@byonghun , please update rn-range-slider to version 1.2.4 If it doesn't help, please provide the code you are using.

byonghun commented 5 years ago

Thanks for your quick reply.

Screen Shot 2019-06-10 at 10 09 35 PM

This is a screenshot of how I set it up.

I tried updating the version but once I updated the library, the range slider does not show where it's supposed to.

githuboftigran commented 5 years ago

@byonghun , the api was changed because of problems with setting high and low value. Please have a look. Now there are no lowValue and highValue props anymore. Instead you have methods setHighValue and setLowValue to set high and low values manually. this._rangeSlider.setLowValue(42); And also don't forget to unlink and link again rn-range-slider: react-native unlink rn-range-slider react-native link rn-range-slider

byonghun commented 5 years ago

Gotcha! I appreciate it, I'll give that a try.

githuboftigran commented 5 years ago

@byonghun , please close this issue if everything works.

byonghun commented 5 years ago

@githuboftigran I've tried react-native unlink rn-range-slider and react-native link rn-range-slider and manually installing it but it still doesn't render the range slider. I've removed lowValue and highValue as well.

Screen Shot 2019-06-10 at 11 19 59 PM
githuboftigran commented 5 years ago

What do you mean by saying "doesn't render range slider"? Does it have fixed height? What's in rangeStyle? And what are the values of min and duration?

byonghun commented 5 years ago

It's empty where it's supposed to render.

My rangeStyle has height 20, width 250, and a marginTop 5.

Min is 0 and duration is 15

byonghun commented 5 years ago

Got it to work. I'll close the issue! Thanks!

I had to Link Binary with Libraries again.

@githuboftigran, appreciate your help!

githuboftigran commented 5 years ago

It's not empty. There is a prop called labelStyle. Default value for it is bubble. And it's not possible to draw a slider with bubble in 20pt height. Try to set the height to 160 or something or change the labelStyle to none. Please read the README and go through all the props.