leecade / leecade/react-native-swiper

Swiper Not working correctly. When load, it started from the 2nd image instead of 1st image.

Open
#1,063 5 comments 0 reactions 1 assignee View on GitHub

@ArrayZoneYour is already working on this.

Since Sep 30, 2019.

🐛bug Resolution: Old Version
Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Which OS?

Android

Version

Which versions are you using:

  • react-native-swiper v?
    1.6.0-nightly.3
  • react-native v0.?.?
    0.59.10
Expected behavior:

I have 3 images. when I load my app its should load the 1st image.

Actual behavior:

I have 3 images. when I load my app its automatically loaded the 2nd image instead of 1st image . and when I swipe back to the 1st image it goes to 2nd Image.

`

    <Swiper style={styles.wrapper}
      showsPagination={false}
      index={1}
      loop={false}>

      <View style={styles.slide}>
        <Image
          style={styles.image}
          source={require('../src/femaleShapeImages/feshape1.png')}
          resizeMode='contain'
        />
      </View>

      <View style={styles.slide}>
        <Image
          style={styles.image}
          source={require('../src/femaleShapeImages/feshape2.png')}
          resizeMode='contain'
        />
      </View>

      <View style={styles.slide}>
        <Image 
          style={styles.image} 
          source={require('../src/femaleShapeImages/feshape3.png')}
          resizeMode='contain' 
        />
      </View>
    </Swiper>
  </View>`

const styles = StyleSheet.create({
wrapper: {
backgroundColor: '#fff'
},
slide: {
flex: 1,
backgroundColor: 'transparent'
},
container: {
flex: 1,
},
image: {
width:"100%",
height:"80%"
}

});

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.