native decay animation

Summary: Add support for `useNativeDriver: true` to `Animated.decay`. Add example in Native Animated Example UIExplorer app.

Reviewed By: ritzau

Differential Revision: D3690127

fbshipit-source-id: eaa5e61293ed174191cec72255ea2677dbaa1757
This commit is contained in:
Felix Oghina
2016-08-19 07:06:29 -07:00
committed by Facebook Github Bot 5
parent 37ab1c8844
commit 2a7f4be8f8
5 changed files with 161 additions and 3 deletions

View File

@@ -139,6 +139,8 @@ import javax.annotation.Nullable;
animation = new FrameBasedAnimationDriver(animationConfig);
} else if ("spring".equals(type)) {
animation = new SpringAnimation(animationConfig);
} else if ("decay".equals(type)) {
animation = new DecayAnimation(animationConfig);
} else {
throw new JSApplicationIllegalArgumentException("Unsupported animation type: " + type);
}