react-native-viewpager icon indicating copy to clipboard operation
react-native-viewpager copied to clipboard

Can not customize the width, when the specified width, the two sides will be more of a painting! I hope the author can give a solution. Thanks to the author's library!

Open HAPENLY opened this issue 8 years ago • 3 comments

image When I give the picture to the width of the time, twice will show the candidate picture. Tried a lot of ways can not be resolved, I hope the author concerned about this issue, so that the library better use. Thanks to the author's library!

HAPENLY avatar May 24 '17 08:05 HAPENLY

Not sure if that helps but I wasn't successful controlling the width of the <ViewPager> either. I ended up wrapping it around a regular <View> and it worked exactly like I expected. HTH.

clarete avatar Jun 01 '17 04:06 clarete

@clarete what do you mean, how do you put a View as a child of ViewPager to force the width?

jslz avatar Sep 20 '17 17:09 jslz

Hi @jslz I just put the ViewPager element within a View and set the width of the View.

   <View style={{ width: Dimensions.get('window').width }} ref="viewPager">
      <ViewPager (...) />
   </View>

clarete avatar Sep 26 '17 02:09 clarete