Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-swiper in react-native-scrollable-tab-view can,t show #200

Closed
yuanji123 opened this issue Jul 26, 2016 · 23 comments
Closed

react-native-swiper in react-native-scrollable-tab-view can,t show #200

yuanji123 opened this issue Jul 26, 2016 · 23 comments
Labels

Comments

@yuanji123
Copy link

where i put react-native-swiper into react-native-scrollable-tab-view, the image can,t show, my react-native version is 0.28, how can i solve this.

image

@yuanji123
Copy link
Author

i found is not the problem of reac-native-scrollable-tab-view ,when i use react-native-swiper in listview renderHeader in android, the image can,t show

@aneesv
Copy link

aneesv commented Jul 27, 2016

Have similar issue, Image is not loading when used inside listview

@xiaomilii
Copy link

Have a same issue

@skx11500
Copy link

skx11500 commented Aug 2, 2016

Have similar issue , i see the source code ,maybe use ViewPagerAndroid lead to this problem

@liuxisong
Copy link

Have similar issue, did anyone solve this?

@taisyo7333
Copy link
Collaborator

taisyo7333 commented Aug 9, 2016

Did you try to add prop 'removeClippedSubviews={false}' ?

<Swiper removeClippedSubviews={false}>
{this.props.children}
</Swiper>

removeClippedSubviews causes the same problem.

@habibridho
Copy link

I got the same problem when using this swiper and react-native-scrollable-tab-view. According to this which is a quite similar case, there is a problem with the use of ViewPagerAndroid. So I try to find ViewPagerAndroid in the source file and replace it with Scrollview. And now it works like charm alongside react-native-scrollable-tab-view.

@leecade is there any particular reason in using ViewPagerAndroid?

@habibridho
Copy link

I found out that the workaround I mentioned above, messed up with the pagination.

I find another solution to integrate this swiper and react-native-scrollable-tab-view without messing the source file. I make another component that only render the swiper, then mount it in the main component.

@toearth
Copy link

toearth commented Sep 2, 2016

I use the way mentioned by @habibridho , replace ViewPagerAndroid by the Scrollview. The swiper show, but when I swipe to right after fifth time, the swipe can't be sliced again, what the problem.

@438198602
Copy link

I also encountered the same problem。

@liuya891012
Copy link

liuya891012 commented Sep 30, 2016

<ListView removeClippedSubviews={false} />

@leecade
Copy link
Owner

leecade commented Sep 30, 2016

@liuya891012 yes, scrollview won't render sub component outside of viewport for improve performance

@leecade leecade closed this as completed Sep 30, 2016
@ammichael
Copy link

ammichael commented Oct 18, 2016

Guys, I'm having this same issue. I'm using a swiper inside a main swiper. If I change something in the code and reload, it shows perfectly. Tried to set all ScrollView and Swiper removeClippedSubviews props to false, changed ViewPagerAndroid in source to ScrollView, but nothing works.

If I change to loop false and swap, the next image loads too.

Help? =(

android-swiper-bug

@aqnaruto
Copy link

aqnaruto commented Dec 3, 2016

image
image
still not work @liuya891012

@aqnaruto
Copy link

aqnaruto commented Dec 3, 2016

but nothing works +1 @ammichael

@qizhenshuai
Copy link

where add??

@woshi82
Copy link

woshi82 commented Dec 9, 2016

yup, i have try this #311, and the problem solved.you can try this way selectively

@mahaaoo
Copy link

mahaaoo commented Apr 1, 2017

react-native-scrollable-tab-view cause the problem,i have used another component to solved it

@huy-lv
Copy link

huy-lv commented Apr 26, 2017

@Mah93 which lib do you use?

@chudaotrucnhan
Copy link

find the index.js in node_modules\react-native-swiper\src. In the line 640 replace ViewPagerAndroid >> ScrollView.
Comment onPageSelected={this.onScrollEnd} and add onMomentumScrollEnd={this.onScrollEnd}
Edit line 466: this.scrollView && this.scrollViewanimated ? 'setPage' : 'setPageWithoutAnimation' >> this.scrollView && this.scrollView.scrollTo({ x, y, animated })
Sorry to arthur of react-native-swiper i just want to use it on android =.=

@wowge
Copy link

wowge commented Apr 9, 2018

@chudaotrucnhan You're right!

@HuXin957
Copy link

please add key={JSON.stringify(data)} , retry

@skx11500
Copy link

skx11500 commented Feb 25, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests