mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3352b57a6f
Summary: This diff makes the fling animator cuztomizable, so that the subclasses can have their own animation for fling behavior. Before the diff, we rely on the `OverScroller` to `fling`, which has some issues with Spline interpolation being messed up due to the clamped fling distance (See more details in T105464095). This may not be a big issue for mobile when user touches screen, but in VR environment this shows up very clearly with joystick events. To fix that properly without affecting mobile behavior, I added a new interface `HasFlingAnimator` from the helper, and implemented with default fling animator in the OSS ScrollView. We should consider adopt a suitable animator for mobile platform, as the non-smooth fling effect is also happening in mobile. - Add interface `HasFlingAnimator` to `ReactScrollView` and `ReactHorizontalScrollView` - Add default fling animator - Depend on if the default animator is used, customize the flingAndSnap behavior Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D32382806 fbshipit-source-id: 08f03350f6a9b9fc03414b4dcb9977b9f33603ba
Building React Native for Android
See the docs on the wiki.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.