-
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
Choppy behaviour on iOS when slide's width is small #51
Comments
@alialaa Hi! Could you tell me which version of the plugin you're currently using? Also, can you try to set |
@bd-arc Hey, I am using 2.0.3 and I think enableMomentum is false by default, I tried setting it to true it got even worse that it won't even change the slide at all. |
@alialaa I must admit that we didn't create this plugin with small slides in mind, which means we might need to adjust a few things for this use case. I will take a look at it shortly and keep you posted. |
@bd-arc thanks a lot, please update me even if it can't be done so that I can find another solution. |
@alialaa Hi! I've just published a new version ( Setting a smaller value than the default |
@bd-arc Hey, this was useful but I don't think it's what was causing my issue, I am posting you an actual video to illustrate the issue a bit more accurately. as you can see the slide is set to active when it has a 100% opacity but when I release my hand some weird bouncing animation happens. |
@alialaa Thanks for the video; it helps clarifying the issue. If this is not too much trouble, could you create a basic React Native project with your picker? Nothing fancy, just the carousel implementation and your styles. I would then use this as a starting point to investigate further. |
@bd-arc Ok I'll do it next week, thanks a lot. |
Hello, same issue here!
The size of a slide is:
As above, |
@alialaa can you past the code you used in the new projetc? This is mine: const slides = elements.map((entry, index) => {
return (
<View key={index} style={{
backgroundColor: colors.white,
height: 100,
width: 200,
marginHorizontal: 15,
marginVertical: 5,
padding: 10,
borderRadius: 5,
shadowColor: '#000',
shadowOffset: {
width: 2,
height: 3
},
shadowOpacity: 0.2
}}>
<ProximaText>{entry.title}</ProximaText>
<ProximaText>{entry.location.name}</ProximaText>
<ProximaText>{entry.time}</ProximaText>
</View>
)
})
return (
<Carousel
sliderWidth={windowWidth}
itemWidth={230}
inactiveSlideScale={1}
showsHorizontalScrollIndicator={false}
removeClippedSubviews={false}
containerCustomStyle={{
position: 'absolute',
bottom: 20
}}
>
{slides}
</Carousel>
)
} |
Thanks! <View style={{ flex: 1, alignItems: 'center' }}>
<Carousel />
</View> The problem disappear (but in my case disappear the Map component as well :P) Edit: <View style={{ flex: 1 }}>
<Map />
<Carousel />
</View> |
@alialaa Thanks for letting me know ;) @delvedor I assume that you're trying to recreate something along the lines of our map implementation, aren't you? :) There might be a touch handling conflict between the two components. One thing you should know is that our |
Oh, I see! <View style={{ flex: 1 }}>
<Map />
<Modal position='bottom' isOpen>
<Carousel />
</Modal>
</View> |
@delvedor Absolutely. |
Perfect, now I give it a try and I let you know, thanks! |
Nope, same issue :S render () {
return (
<View style={{ flex: 1 }}>
{this.renderMapOrSpinner()}
<Modal
position='bottom'
isOpen
backdrop={false}
swipeToClose={false}
style={{
backgroundColor: 'rgba(0,0,0,0)',
height: 130
}}
>
{this.renderCarousel()}
</Modal>
</View>
)
} If I remove the map element, the carousel works perfectly. Edit: |
@delvedor Yes, we're using the AirBnb plugin. It's broken in many ways, but there are no real alternatives at the moment :( Could you try with the |
@bd-arc I know :S |
@delvedor Then I'm currently out of ideas :-) |
At the moment I cannot create it, if you want we can talk in private (mail?). |
@delvedor Let's do that. You can reach me at [email protected]. Make sure to include everything that could help me reproduce the issue. A zip file of your project including only the relevant components (stripped from any sensitive data) would clearly come in handy ;-) |
@delvedor Hi! Unless I'm mistaken, I haven't heard from you yet. Are you still facing the issue? |
Closing as no further feedback was provided. |
Hi! If something changes I let you know, thank you for your help and patience. |
@delvedor Thank you for letting me know. Do not hesitate to ping me if the issue comes back ;) |
I am having a situation where I want to use the carousel to act like an option picker, the user will swipe to choose a certain option. so I am having a slide width of 80 and the width of the slider is the same as the device width. It's working pretty well on android however it's acting very weird on iOS. it may not be clear here but it's even choppier on an actual device.
Android
iOS
The text was updated successfully, but these errors were encountered: