-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Snapping between items is very jerky #189
Comments
|
I'm also experiencing weird behaviour on iOS. It wasn't like this a few months ago. Not sure which version i had the best success with though, I will hunt it down and report back here |
@eurobob This is strange, because I can't reproduce the issue. Would you mind sharing a screencast or setting up an Expo example? |
@bd-arc I'll try to put together a screencast. I also see this on the showcase application. Basically, the speed of the swipe versus the speed of the snap is different, so you get this moment of switching between the swipe and the snap. I suppose this is the best we are going to get until react-native improves ScrollView etc. |
I thought I had already uploaded a screencast but it must not have gone through. Attaching it to this post instead |
@AdamPD Thanks for describing the issue in greater details. @eurobob Thank you for taking the time to put the screencast together! You said that a previous version of the plugin wasn't affected by the issue. I'm surprised, especially because @AdamPD experiences the issue even with the showcase app that uses version Unfortunately, we don't have much control over I'll see what I can do about implementing Your input and suggestions are most welcome ;-) |
@bd-arc - I tried to implement this iOS only using |
I have a similar issue (I think it's the same issue, just more pronounced), it seems to pause mid-transition (or as soon as touch is released), and is more pronounced when the carousel is released at the mid-point between slides. The closer to the middle, the more often it happens. |
@JulianKingman I don't think that this is the same issue. The original one has to do with how velocity and momentum are handled, while yours looks like a performance issue. Please open another issue with a reproductible example (take a look at the contributing guidelines) and I'll gladly take a look at it. |
@AdamPD @eurobob This seems less of an issue with the new layouts I've introduced in version Maybe it would be possible to create a custom interpolation that would compensate for the lack of velocity handling? |
Hello, I tested today the carousel from the app https://itunes.apple.com/lu/app/archriss-presentation-mobile/id1180954376?mt=8, when swiping between item it's seems not very fluid, or it's desired? does increasing the speed will remove this jerky behaviour ? |
@ikalangita The We've implemented a bunch of workarounds, but ultimately they are just poor substitutes for the missing features. Take a look at this note if you want to know more and to vote for RN's feature requests. As a side note, the app you've tested uses version |
Thank you for reply, i will test the new version then :), does example provided by the repo use this latest version? |
@ikalangita Absolutely! Also make sure to try out the brand new |
@JulianKingman sorry, a bit oot, how do you achieve the full screen slider like your gif animation? I tried setting Sorry, I found it in the documentation: I just need to add the extra: |
@JiboStore for reference, I just used itemWidth and sliderWidth, and had to be careful about using absolute positioning and flex sizing. |
Hi, I have a similar issue, though the movement seems smooth, the snapping is not... Snappy. |
hi @bd-arc, Here in the snack it seems to work better... (still off center). Could it be because my render function is getting called whenever the props are updating? (which happens about once a second due to a websocket interaction) |
@fotoflo It's definitely not a plugin issue. My guess is that you've inadvertently activated the "Slow animations" feature of the iOS simulator (see the "Debug" menu). Regarding slides' alignment, you made three mistakes:
Use the following and you'll be fine:
|
@bd-arc Thank you, excellent debugging job! works great 👍 |
Here's an updated example. I think it shows a few important things:
https://snack.expo.io/@fotoflo/react-native-snap-carousel-example I'm just a beginner, so there may be things you want to change, but please feel free to use it as a more complete example. |
Thanks @fotoflo, but are you aware of the fact that there is already an example app that features this and much more ? ;) Note that I will soon be able to work on adding a bunch of new examples. See #257 for more info. |
help me how to use snap carraosel basic |
I am also facing the similar issue. I have placed the carousel absolutely positioned on the top of a
I am using: "react": "16.6.3", |
This helps me to fix the flickering of carousel after the loop.This can also fix this issue:#368 |
Smooth scrolling will finally be a reality in the next version. |
@bd-arc if I set the autoplay prop to true thele animation is kind of fast that does not feel like it is animating but feels like only data in the card is changing. help needed |
Hi guys,
I've searched around a lot and haven't found any information about this, but even the simplest of tests with the carousel I find are very jerky.
When swiping between items in the carousel, I notice that as soon as I release my finger, the speed of the snap changes. This means when I quickly flick to the next item, it instantly slows the snap speed so it looks like the swipe "hit a wall."
I'm tested this using Expo on an iPhone 7.
I've compared this to the native ScrollView with pagingEnabled or even snapToInterval and that has a much smoother effect.
Is this purely because the "snapping" action can't work out how much force a user swiped with? Or am I completely missing something?
I can probably put together an Expo snack to demonstrate the issue if need be.
The text was updated successfully, but these errors were encountered: