eden
eden

Reputation: 6103

Scrolling continuously without user interaction

Is there a way to scroll ScrollView programmatically to achieve an animation similar to ticker shown below?

the truax ticker

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

Answers (1)

Thijs
Thijs

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

Related Questions