From 8e1e46db8782d5bb4876007de0d0d4a1a8e1862b Mon Sep 17 00:00:00 2001 From: Jason Healy Date: Fri, 5 May 2017 00:01:06 +0100 Subject: [PATCH] Adding 'setLayoutAnimationEnabledExperimental' flag to UIManagerStatic for Android LayoutAnimation (#16317) --- types/react-native/index.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a7dc4da43a..5fd5b40b96 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -7471,6 +7471,18 @@ export interface UIManagerStatic { onFail: () => void, /* currently unused */ onSuccess: MeasureLayoutOnSuccessCallback ): void; + + /** + * Automatically animates views to their new positions when the + * next layout happens. + * + * A common way to use this API is to call it before calling `setState`. + * + * Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`: + * + * UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); + */ + setLayoutAnimationEnabledExperimental(value: boolean): void; } export interface SwitchPropertiesIOS extends ViewProperties {