Reputation: 6103
Is there a way to scroll ScrollView programmatically to achieve an animation similar to ticker shown below?
So far I have tried using scrollToOffset
with setInterval
but the animation looks laggy (due to the animation completion duration and interval firing speed). It would be helpful to know when scroll is about to finish, or calling a callback function when scrollToOffset
is completed. But neither of them seems to be possible.
Upvotes: 1
Views: 480
Reputation: 738
Maybe take a look at react-native-text-ticker? It doesn't use FlatList but it has a nice animated text scroll.
Upvotes: 1