I've a scrollview and on both sides, I've two buttons left and right.
when i click the scroll view will move left and when right button is clicked it will move right side. My scrollview has 20 buttons (approx) & on click of each button some action is performed.
Everything is perfectly implemented and working fine.
Only thing i couldn't implement is to prevent scrolling by touch. I don't want user to scroll the scrollview manually. How can i prevent it from scrolling by touch and still able to click the buttons inside the scrollview ?
Go to Settings and tap Accessibility. Turn on the feature, then use the slider to select a sensitivity level.
To enable or disable scrolling on FlatList with React Native, we can set the scrollEnabled prop. to set the scrollEnabled prop to false to disable scrolling on the FlatList.
Try setting yourScrollView.scrollEnabled = NO;
. That should do exactly what you want.
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