intellidev1991 / react-native-image-slider-box

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

Autoplay feature? #5

Closed jhoanborges closed 4 years ago

jhoanborges commented 4 years ago

is tehre any way to achieve this like the original library? https://github.com/archriss/react-native-snap-carousel/blob/master/src/carousel/Carousel.js

intellidev1991 commented 4 years ago

Hi there,

please use the circleLoop property just like below example :

<SliderBox circleLoop />

jhoanborges commented 4 years ago

Hi there,

please use the circleLoop property just like below example :

<SliderBox circleLoop />

circleLoop just add an infitine slide transition, but not an autoplay. This is my code.

          <SliderBox

          ImageComponent={FastImage}
          style={{
            borderRadius:5
          }}
          images={
            subasta.images.map((image) =>
            GLOBAL.BASE_URL_STORAGE + image.url,
            )
          }
          onCurrentImagePressed={(index) =>{            
          }
        }
        dotColor="#808080"
        inactiveDotColor="#fff"
        dotStyle={{
          width: 15,
          height: 15,
          borderRadius: 15,
          marginHorizontal:0,
          padding: 0,
          margin: 0,
          borderColor: '#d6d7da',
          borderWidth:2
        }}
        paginationBoxStyle={{
          position: 'relative',
          bottom: 0,
          padding: 0,
          alignItems: 'center',
          alignSelf: 'center',
          justifyContent: 'center',
          paddingVertical: 0,
          marginTop:20
        }}
        parentWidth={this.state.width}
        circleLoop
        />
basilaiman commented 4 years ago

Yes, It doesn't

jhoanborges commented 4 years ago

Oh, I'll try to contribute with this feature. The base component has an autoplay feature.

intellidev1991 commented 4 years ago

Hi, Please first, install the last version( new version published ) then use these props:

autoplay
circleLoop