mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fe6277a30d
Summary: This diff add custom prediction for fling distance support. This is needed for customize fling animator to calculate predicted fling distance, instead of using the overscroller that may not be used by the animator. More context on this -- when fling happens, our code will first predict the final fling position `p`, apply the snapping logic to decide the expected snapping position `pSnapping` given `p`, scroll velocity and children layout, then trigger the overscroller (existing) or custom fling animator to finish the fling. Currently, the prediction logic is done with overscroller, and custom fling animator has no control over how the predicted fling distance should be. Changes in this diff allow the animator to override `getExtrapolatedDistance` method and provide that information. Changelog: [Android][Added] - Add new API for custom fling animator to provide predicted travel distance for its fling animation. Reviewed By: mdvacca Differential Revision: D32571734 fbshipit-source-id: d34b969206f8b6cb5c68d2f50a18749bfebbc97e
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.