alantoa / react-native-awesome-slider

🚀 An anwesome <Slider/> that supports various features haptic, lottie, animation, ballon, etc.
MIT License
228 stars 28 forks source link

Vertical #3

Closed maartenvandillen closed 2 years ago

maartenvandillen commented 2 years ago

Hi can you add a vertical prop to make a vertical slider?

alantoa commented 2 years ago

Ye, @maartenvandillen I need a moment, wait for me.

alantoa commented 2 years ago

I think you can use style to vertical. @maartenvandillen Example code:

 <Slider style={[
      styles.container,
      {
        transform: [
          {
            rotate: '90deg',
          },
        ],
      },
    ]}
    progress={progress5}
    minimumValue={min}
    maximumValue={max}
    minimumTrackTintColor="#FFAB76"
    maximumTrackTintColor="#FFEEAD"
  />
maartenvandillen commented 2 years ago

transforms are only visual. Does that work ok with the gesture handler?

alantoa commented 2 years ago

It's ok, I tried, but you may need to adjust the position. 截屏2022-02-12 上午12 58 08

maartenvandillen commented 2 years ago

Thanks for looking into this. I just realised I need to upgrade to reanimated v2 and use the Hermes engine on Android. Are those two ready for production? My last experience with Hermes was a SIGFAULT error on app startup so I stayed clear from it for a while.

alantoa commented 2 years ago

Yes, I‘ve been using Hermes since react-native 0.64+, hermes engine is awesome. If you encounter any problems using Hermes there are solutions.

alantoa commented 2 years ago

Hi, @maartenvandillen If there is no problem, I will close this Issue, thank you!