Please sign in to comment.
Add support for animated events
Summary: This adds support for `Animated.event` driven natively. This is WIP and would like feedback on how this is implemented. At the moment, it works by providing a mapping between a view tag, an event name, an event path and an animated value when a view has a prop with a `AnimatedEvent` object. Then we can hook into `EventDispatcher`, check for events that target our view + event name and update the animated value using the event path. For now it works with the onScroll event but it should be generic enough to work with anything. Closes #9253 Differential Revision: D3759844 Pulled By: foghina fbshipit-source-id: 86989c705847955bd65e6cf5a7d572ec7ccd3eb4
- Loading branch information...
Showing with 527 additions and 34 deletions.
- +49 −0 Examples/UIExplorer/js/NativeAnimationsExample.js
- +2 −0 Libraries/Animated/src/Animated.js
- +154 −22 Libraries/Animated/src/AnimatedImplementation.js
- +12 −0 Libraries/Animated/src/NativeAnimatedHelper.js
- +3 −1 Libraries/Animated/src/__tests__/Animated-test.js
- +52 −0 ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.java
- +22 −5 ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
- +68 −3 ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java
- +0 −2 ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.java
- +28 −0 ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcher.java
- +16 −0 ReactAndroid/src/main/java/com/facebook/react/uimanager/events/EventDispatcherListener.java
- +1 −0 ReactAndroid/src/test/java/com/facebook/react/animated/BUCK
- +120 −1 ReactAndroid/src/test/java/com/facebook/react/animated/NativeAnimatedNodeTraversalTest.java
Oops, something went wrong.