If there is only one item or few items in ScrollView on Android, I won't get any event from onScorll. In iOS, I still could get the event because the bounces.
My problem is how could I listen to the scroll offset on Android with a list? I've tried PanResponder, but in my case, I would like to detect the swipe down and up gesture in a vertical Flatlist.
Flatlist is built internally using the responder API, so if it doesn't do exactly what you want then you definitely can use PanResponder.
If there is only a few items in your data array then the list can't scroll, so no scroll will be triggered.
If you are just trying to track a swipe gesture for example do dismiss something, that isn't really what Flatlist was designed to solve, and you could use PanResponder directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With