meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.25k stars 2.26k forks source link

Android - flickering last to first item (onSnapToItem setState) #809

Open andresarezo opened 3 years ago

andresarezo commented 3 years ago

Hi, I notice that the carrousel is flickering in Android(last image to first one) when in onSnapToItem function the state has changed. Like: onSnapToItem={(index) => {
this.setState({activeDotIndex: index}); }} Similar issue like this pull request should be fix : https://github.com/meliorence/react-native-snap-carousel/pull/368

Please take a look.

Thanks

Yoona6371 commented 3 years ago

i think we encounter the same problem,the last imag in Carousel is flickering when running android

Balasnest commented 3 years ago

Facing the same issue. I have 3 data and it's flickering the first image of every 3rd loop. For some devices, it's happening for every loop.

minh-dai commented 3 years ago

+1

karanbhatia507 commented 3 years ago

Any solution?

minh-dai commented 3 years ago

@karanbhatia507 add props : itemWidth

15110011 commented 3 years ago

i have the same issue when swiping from last to first item and vice versa. I saw onSnapToItem() call 2 times when i did that. Any solution? "react-native-snap-carousel": "^3.9.1", "react-native": "0.60.6"

viratkohli3797 commented 3 years ago

Hi, I'm facing the same issue. Any workaround?

molimat commented 3 years ago

Facing the same issue, warding here.

ss2012 commented 3 years ago

removeClippedSubviews={false}可以解决这个问题,通过这个swiper库leecade/react-native-swiper#1232

的问题产生的灵感来源,Carousel有同样的属性,试验过可以解决

15110011 commented 3 years ago

any update?

minh-dai commented 3 years ago

@15110011 add props : itemWidth

15110011 commented 2 years ago

@15110011 add props : itemWidth

i did but its still flickering

dohooo commented 2 years ago

Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2

linxianxi commented 2 years ago

removeClippedSubviews={false}可以解决这个问题,通过这个swiper库leecade/react-native-swiper#1232

的问题产生的灵感来源,Carousel有同样的属性,试验过可以解决

works for me

Warywise commented 2 years ago

removeClippedSubviews={false}可以解决这个问题,通过这个swiper库leecade/react-native-swiper#1232

的问题产生的灵感来源,Carousel有同样的属性,试验过可以解决

Works for me too! Thanks!

alisaya10 commented 2 years ago

add this line will fix the issue

removeClippedSubviews={false}

PhamMinhTien05102001 commented 2 months ago

i did use removeClippedSubviews={false} but not working, please help