Open RMCollins175 opened 3 years ago
<Carousel inactiveSlideOpacity={1} inactiveSlideScale={1}
@ringcoa unfortunately it doesn't make any difference.
@ringcoa unfortunately it doesn't make any difference.
It's late for sure, but maybe someone will be in need.
This behaviour is caused not by the carousel itself, but by the item we are rendering inside of it.
Most of the time we are rendering a touchableOpacity
component for each item and this will capture the touch too.
Adding delayPressIn={ 50 }
as a prop of the touchableOpacity
should fix this problem.
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
Is this a bug report, a feature request, or a question?
Question:
How can you disable the highlighting effect when tapping to scroll?
Take the default carousel layout
<Carousel layout={'default'} />
demonstrated here: https://github.com/meliorence/react-native-snap-carousel#layouts-and-custom-interpolationsAs the user scrolls left and right, tapping each carousel item to scroll reduces opacity to create a highlight press effect. How can I disable this? The idea is not to confuse the user with scrolling vs selecting an item (and onto another screen)
Hope that was clear enough. Thanks for reading.