intellidev1991 / react-native-image-slider-box

A simple and fully customizable React Native component that implements an Image Slider UI.
MIT License
267 stars 98 forks source link

Is there any way to go to a specific image index or method like snapToIndex #42

Open gypsicoder opened 4 years ago

gypsicoder commented 4 years ago

I want to have 2 buttons previous and next. And clicking on those buttons I want to change the image of the slider box. Is there any way to do that?

MatteoAlberghini commented 4 years ago

Hi, I'm not the maintainer of the library, but I had a similar problem (I wanted the user to be able to scroll the images with touch and without scrolling)

I solved it this way:

If the maintainer is reading this comment, you can implement a custom forward or backwards scroll using this._ref.snapToNext() or this._ref.snapToPrev()

mtebele commented 3 years ago

Exactly, check out my fork, I've already implemented this: https://github.com/CodeaIT/react-native-image-slider-box

punjasin commented 3 years ago

@mtebele i try your fork but seem only dot is move image is doesn't