Carousel not scrolling in Android when put inside a ScrollView but works in IOS.
See original GitHub issueIs this a bug report, a feature request, or a question?
bug report
Have you followed the required steps before opening a bug report?
(Check the step you’ve followed - put an x
character between the square brackets ([]
).)
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn’t already been reported.
- I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
Have you made sure that it wasn’t a React Native bug?
yes
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Tested on Android Version 9 pie
Is the bug reproductible in a production environment (not a debug one)?
yes
Environment
Environment: React: 16.9.0 React native: 0.61.4 react-native-snap-carousel: ^3.8.4
Target Platform: Android (9)
Expected Behavior
carousel should scroll when inside ScrollView
Actual Behavior
Carousel not scrolling in Android when put inside a ScrollView but works in IOS.
Reproducible Demo
here is expo snack to reproduce the issue, (Please run it in your android phone) https://snack.expo.io/@sagar293/flatlist-inside-scrollview
Steps to Reproduce
(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)
- Create a ScrollView in that render the card as shown in the expo snack
- inside the card create the “Carousel” from “react-native-snap-carousel” to render the images
- run it in your Android device
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:12
Top Results From Across the Web
react-native-snap-carousel not scrolling in Android when put ...
I want to render react-native-snap-carousel inside cards which scrolls horizontally for which i am using ScrollView(horizontal), but the ...
Read more >Slider in ScrollView steals swipe gestures on Android (works ...
I started working with Xamarin.Forms and have a odd problem. As soon as I put a Slider inside of a ScrollView, the slider...
Read more >Common bugs in React Native ScrollView and how to fix them
React Native's ScrollView component is ubiquitous, but its implementation can sometimes lead to mistakes. Learn what to look out for here.
Read more >react-native-snap-carousel - npm
Android's debug mode is a mess: timeouts regularly desynchronize and scroll events are fired with some lag, which completely alters the inner ...
Read more >overscroll-behavior - CSS: Cascading Style Sheets | MDN
If you have overscroll-behavior: contain; selected, the outer container will not scroll unless you move your cursor out of the inner container ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a quick guess, this could be related to RN’s Bug on Android concerning nested horizontal ScrollViews. As a workaround, try to use the ScrollView Component of
react-native-gesture-handler
. See https://github.com/facebook/react-native/issues/21436This helped me https://github.com/gorhom/react-native-bottom-sheet/issues/311#issuecomment-794418413