leecade / leecade/react-native-swiper

ios stop center

Open
#1,245 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

ios stop center

Version

Which versions are you using:

  • react-native-swiper v1.5.14
  • react-native v0.61.2
Expected behaviour

work fine

Actual behaviour

ios stop center, android work fine

render() {
    const { list, referral_url } = this.props;
    let qrView = referral_url ? (
      <View style={styles.qrCode}>
        <QRCode
          value={referral_url}
          size={80}
          color="#000" 
          backgroundColor="white"
          // logo={mine.defaultUserLogo}  
          // logoSize={20}
        >
        </QRCode>
      </View>
    ) : null;
    let itemViews = [];
    list.map((cl, index) => (
      itemViews.push(
        <View style={styles.slide} key={`${index}`}>
          <Image source={{ uri : cl.name }} style={styles.image}/>
          {qrView}
        </View>
      )
    ))
    return (
      <View style={{ overflow : 'hidden', width : SCREEN_WIDTH, height : SCREEN_WIDTH * 0.9 * 1.4 }}>
        <Swiper
          key={new Date()}
          style={[ styles.wrapper, { height : SCREEN_WIDTH * 0.9 * 1.4 } ]}
          autoplay={false}
          width={SCREEN_WIDTH}
          height={SCREEN_WIDTH * 0.9 * 1.4}
          autoplayTimeout={5}
          showsPagination={false}
          horizontal={true}
          loop={true}
          removeClippedSubviews={false}
          automaticAdjustContentInsets={true}
        >
          {itemViews}
        </Swiper>
      </View>
    )
  }

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.

Research direction

Start at the render() entry point and the configuration shown in the issue, using react-native-swiper v1.5.14 with React Native 0.61.2. Reproduce the iOS behavior with the supplied component and compare it with Android. Done means the swiper centers and works on iOS without regressing Android behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.