leecade / react-native-swiper

The best Swiper component for React Native.
MIT License
10.37k stars 2.35k forks source link

react-native 0.48.3 swiper inside scrollview white space on android. #574

Open sagark1510 opened 6 years ago

sagark1510 commented 6 years ago

Which OS ?

Android

Version

Which versions are you using:

Expected behaviour

Should show image

Actual behaviour

white space nothing come up. Note: it works without scrollview as expected.

How to reproduce it>

To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.

     <ScrollView removeClippedSubviews={false}>
            <View style={{height: 300, width: 360}}>
                  <Swiper style={style.sliderBox}>
                       <View style={style.sliderBox}>
                            <Image source={images.banner1} resizeMode="cover" style={style.banner} />
                        </View>
                        <View style={style.sliderBox}>
                            <Image source={images.banner1} resizeMode="cover" style={style.banner} />
                        </View>
                  </Swiper>
            </View>
    </ScrollView>

   style.sliderBox = {flex: 1}
bitcoinvsalts commented 6 years ago

+1

sgd27 commented 6 years ago

same problem here

readthecodes commented 6 years ago

+1

woowalker commented 6 years ago

+1

bitcoinvsalts commented 6 years ago

add containerStyle={{width: Dimensions.get("window").width}}

<Swiper containerStyle={{width: Dimensions.get("window").width}} >

zhangruiyu commented 6 years ago

same problem here

evan0204 commented 6 years ago

same problem here

blaremc commented 6 years ago

Reproduced on the ios 11 with Expo

kadoshms commented 6 years ago

+1

derekbrown commented 6 years ago

+1. Bump.

DaveHudson commented 6 years ago

Adding containerStyle width & height to Swiper component solved the problem for me

<Swiper containerStyle={{ width: Dimensions.get('window').width, height: Dimensions.get('window').height }} />

pencilcheck commented 6 years ago

The workaround doesn't work for me. Trying to display an array of wix/react-native-calendars inside the swiper and it doesn't show anything on Android (works on iOS)

lbhsot commented 6 years ago

https://github.com/leecade/react-native-swiper/issues/426

add timeout

hbarylskyi commented 6 years ago

There is a better solution: https://github.com/leecade/react-native-swiper/issues/416#issuecomment-309785923

<Swiper removeClippedSubviews={false} .../>

diszrahul commented 6 years ago

This issue remains for me and the suggested solution does not work for me either. I want to know whether or not there is some solution..

MinaFSedrak commented 6 years ago

Same issue , any other solution !?

guaizi149 commented 5 years ago

<ViewPagerAndroid ref='scrollView' {...this.props} key={pages.length} initialPage={this.state.index} onPageSelected={this.onScrollEnd} style={{flex: 1}}> {pages} </ViewPagerAndroid>

add key.