From 1bcba57e75353e276d46b405b2d721ffed0b14cf Mon Sep 17 00:00:00 2001 From: Denis Krivosheev Date: Wed, 29 Mar 2017 15:38:46 +0500 Subject: [PATCH] feat(animation): use native driver for animations --- NavigationAnimatedView.js | 1 + NavigationCardStackPanResponder.js | 1 + NavigationLegacyNavigator.js | 1 + NavigationPagerPanResponder.js | 1 + 4 files changed, 4 insertions(+) diff --git a/NavigationAnimatedView.js b/NavigationAnimatedView.js index c5abffc..163b2b7 100644 --- a/NavigationAnimatedView.js +++ b/NavigationAnimatedView.js @@ -55,6 +55,7 @@ function applyDefaultAnimation( { bounciness: 0, toValue: navigationState.index, + useNativeDriver: true, } ).start(); } diff --git a/NavigationCardStackPanResponder.js b/NavigationCardStackPanResponder.js index 74f7b8a..24afb27 100644 --- a/NavigationCardStackPanResponder.js +++ b/NavigationCardStackPanResponder.js @@ -199,6 +199,7 @@ class NavigationCardStackPanResponder extends NavigationAbstractPanResponder { { toValue: props.navigationState.index, duration: ANIMATION_DURATION, + useNativeDriver: true, } ).start(); } diff --git a/NavigationLegacyNavigator.js b/NavigationLegacyNavigator.js index d2f1d4c..45ff767 100644 --- a/NavigationLegacyNavigator.js +++ b/NavigationLegacyNavigator.js @@ -395,6 +395,7 @@ class NavigationLegacyNavigator extends React.Component { { duration: 500, toValue: index, + useNativeDriver: true, } ).start(); } diff --git a/NavigationPagerPanResponder.js b/NavigationPagerPanResponder.js index 43e6d15..a5011b9 100644 --- a/NavigationPagerPanResponder.js +++ b/NavigationPagerPanResponder.js @@ -197,6 +197,7 @@ class NavigationPagerPanResponder extends NavigationAbstractPanResponder { { toValue: props.navigationState.index, duration: ANIMATION_DURATION, + useNativeDriver: true, } ).start(); }