I have a horizontal ScrollView, all items have different widths
Is there a way to scroll one by one, so it would stop in the center of each item?
If the first answer to question is yes, then is there a way to know the index of item (that is centered), so I can change the index of selected dot?
https://snack.expo.dev/@drujik/horizontal-scroll-diff-widths
2
Answers
Example for: https://i.stack.imgur.com/thKLv.gif
I’m using FlatList and its props.
More information: https://reactnative.dev/docs/flatlist
You can achieve this by react-native-snap-carousel and For dot, You can use pagination.