Animation is not smooth in android
imyagnesh opened this issue ยท 20 comments
Swipe animation is not smooth in android deviece. for refrejce you can check your space sideswape project
+1 here :(
It turned out that the animation is smooth enough in release version!
I'm noticing the same thing on iOS (iphone 6) using the two Expo snack examples. It does this little hiccup in the middle of a swipe, especially if you do a fast swipe.
very slow... it's an issue
I don't have the bandwidth to work on this at the moment as I'm not really working in react native. it could be seeing degradations due to a number of reasons. if anyone wants to open a PR i would gladly merge it, otherwise it will be awhile before I can jump into it.
I am not really seeing any animation when I leave my finger on the screen, it instantly changes image.
Any input on this?
Anyone found a simple alternative?
I will be getting back into React Native development this year. I'll be looking into this in the next two weeks. If no one else comes up with anything before then I should have at least debugged the issue.
@kkemple Awesome! Have you had a chance to give it a look?
PS: This library API is just so clean and simple, I love it so much.
This package is dead. Has anyone found an alternative?
@spyshower I had this issue last month but fixed it by looking at https://snack.expo.io/@kkemple/spaced-sideswipe. Check components/index.js
file and take a look at the <Planet />
component.
iPhone X - animation good
iPhone 8 - animation so-so
S8 - animation v poor
Quite difficult to verbalise the issue with the current behaviour, but I think it comes down to the animation to move from one 'item' to the next being triggered at the 'threshold', and once
triggered - the animation takes over from the user's swipe input. This moment on Android lasts a few ms and the carousel appears to freeze v v briefly before then jankily animating to the next item. It also makes navigation between multiple items quite difficult.
Does anyone have a way to optimise performance for this, or an alternative solution entirely? I've included a short video from an iPhone 8 (so-so performance). https://www.youtube.com/watch?v=0SqUz-fJPjc&feature=youtu.be
Had the same problem on android. Surprisingly, i was able to solve this problem by simply wrapping the content i was displaying in an Animated.View
(an idea i got from this comment: #38 (comment))
I.e., changing
const renderItem = ({ item }) => <View>... </View>
to
const renderItem = ({ item }) => <Animated.View> ... </Animated.View>
was all it took!
I don't have a lot of time to work on this package right now, I'm open to allowing other maintainers but so far no one has shown a willingness to do so. So if you have to wait on me it could be awhile.
it seems @uladkasach has a solution
Hey @kkemple totally understandable - I think the https://github.com/archriss/react-native-snap-carousel repo is maintained and we had some success by switching to it. Thank you for all your hard work regardless!