Implement completion callback for LayoutAnimation on Android

Summary: All animations are scheduled by the UIManager while it processes a batch of changes, so we can just wait to see what the longest animation is and cancel+reschedule the callback.

Reviewed By: mdvacca

Differential Revision: D14656733

fbshipit-source-id: 4cbbb7e741219cd43f511f2ce750c53c30e2b2ca
This commit is contained in:
Pieter De Baets
2019-04-03 04:38:50 -07:00
committed by Facebook Github Bot
parent a333c2b202
commit f571c62ddf
7 changed files with 71 additions and 37 deletions
@@ -709,8 +709,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule
* Configure an animation to be used for the native layout changes, and native views creation. The
* animation will only apply during the current batch operations.
*
* <p>TODO(7728153) : animating view deletion is currently not supported. TODO(7613721) :
* callbacks are not supported, this feature will likely be killed.
* <p>TODO(7728153) : animating view deletion is currently not supported.
*
* @param config the configuration of the animation for view addition/removal/update.
* @param success will be called when the animation completes, or when the animation get
@@ -719,7 +718,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule
*/
@ReactMethod
public void configureNextLayoutAnimation(ReadableMap config, Callback success, Callback error) {
mUIImplementation.configureNextLayoutAnimation(config, success, error);
mUIImplementation.configureNextLayoutAnimation(config, success);
}
/**