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
@@ -729,8 +729,8 @@ public class NativeViewHierarchyManager {
mJSResponderHandler.clearJSResponder();
}
void configureLayoutAnimation(final ReadableMap config) {
mLayoutAnimator.initializeFromConfig(config);
void configureLayoutAnimation(final ReadableMap config, final Callback onAnimationComplete) {
mLayoutAnimator.initializeFromConfig(config, onAnimationComplete);
}
void clearLayoutAnimation() {