I have build a simple swiper in android where 5 slides are supposed to be shown. On load I can see 5 dots below with the first dot being active but the content is not shown for the same.
Here is my code:
<ScrollView>
<Swiper
height={deviceHeight - 200}
paginationStyle={{ bottom: 20 }}
activeDot={<View style={mainStyles.sliderBullets} />}
loop={false}
>
<SliderContent
// some content
/>
<SliderContent
// some content
/>
<SliderContent
// some content
/>
<SliderContent
// some content
/>
<SliderContent
// some content
/>
</Swiper>
</ScrollView>
If I swipe to second slide and come back to first one it shows the first slide.
Can anyone tell that why is the first slide empty until first swipe?
RN: 0.42.3
Android: 7.1.2 Nexus 5X
React native swiper: 1.5.4
Here is the PR for this: https://github.com/leecade/react-native-swiper/pull/418
+1, did you find any solution for this @sahil290791 ?
@nixoz, I do not think this is ScrollView's issue, even If I remove ScrollView, the swiper slides doesn't show up until first swipe.
@sahil290791 it is.
@nixoz that patch that you applied is only for ios, I am facing this problem in android.
@sahil290791 - ahh, sorry man, my bad. Didn't paid attention to your's environment, coz faced that on ios ...ㅠㅠ
I guess ViewPagerAndroid is not playing well here.
@nixoz it works with your PR on ios, but can anyone merge this request soon?
@sahil290791 did you fix the problem on android?
@lisa718 Nope was unable, so I have enabled autoPlay now, which atleast doesn't show a blank slide.
@sahil290791 OK,thanks
Disabling removeClippedSubviews from the Swiper component fixed this issue for me.
<Swiper
height={190}
showsButtons={true}
removeClippedSubviews={false}>
Was this issue occurring in android for you?
@douglaswissett : Tks, it work. 👍
when i push home button,and enter into app again,the image was gone.........and also at first time,the image could not show up.....
@douglaswissett cool! this issue bothered me for a long time. now it works!
@douglaswissett this facing this issue, I added removeClippedSubviews={false} to Swiper image also not showing
@lisa718 same as you. did you find any solution for this ?
@douglaswissett Thank you. It works.
@douglaswissett Thank you it works.
Most helpful comment
Disabling removeClippedSubviews from the Swiper component fixed this issue for me.