leecade / react-native-swiper

The best Swiper component for React Native.
MIT License
10.4k stars 2.34k forks source link

loadMinimal is not working on andorid #404

Open iamrutvik opened 7 years ago

iamrutvik commented 7 years ago

Hi ,

I am using this package for showing Images swiper. Images are coming from remote server and it could be 50 + images at a time.

Here is the code:

      <Swiper loadMinimalSize={1}
              loadMinimal={true}
              showsButtons={true}
              loop={true}
              showsPagination={false}
              index={this.index}
              nextButton={this.renderNextPrevButton('right')}
              prevButton={this.renderNextPrevButton('left')}
      >
        {
          this.state.fullSwiperImages.map((image, index) => {
            return (
              <View key={index}>
                <CachedImage
                  source={{uri: image.photo}}
                  minimumZoomScale={0.5}
                  maximumZoomScale={3}
                  androidScaleType="center"
                  style={{width: Metrics.screenWidth, height: Metrics.screenHeight}}
                  resizeMode="contain"
                />
                <Text style={Styles.dateStyle}>{Moment(image.created_at.date).format('YYYY-MM-DD hh:mm A')}</Text>
              </View>
            )
          })
        }
      </Swiper>

Load minimal is not working in android, its starting downloading all images. while in ios, it is working fine.

rpopovici commented 7 years ago

workaround here: https://github.com/leecade/react-native-swiper/pull/363