diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java index 2b72a0a33..a57205b86 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java @@ -373,13 +373,12 @@ public class NativeViewHierarchyManager { if (mLayoutAnimationEnabled && mLayoutAnimator.shouldAnimateLayout(viewToRemove) && arrayContains(tagsToDelete, viewToRemove.getId())) { - // Display the view in the parent after removal for the duration of the layout animation, - // but pretend that it doesn't exist when calling other ViewGroup methods. - viewManager.startViewTransition(viewToManage, viewToRemove); + // The view will be removed and dropped by the 'delete' layout animation + // instead, so do nothing + } else { + viewManager.removeViewAt(viewToManage, indexToRemove); } - viewManager.removeViewAt(viewToManage, indexToRemove); - lastIndexToRemove = indexToRemove; } } @@ -424,9 +423,7 @@ public class NativeViewHierarchyManager { mLayoutAnimator.deleteView(viewToDestroy, new LayoutAnimationListener() { @Override public void onAnimationEnd() { - // Already removed from the ViewGroup, we can just end the transition here to - // release the child. - viewManager.endViewTransition(viewToManage, viewToDestroy); + viewManager.removeView(viewToManage, viewToDestroy); dropView(viewToDestroy); } }); diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java index c4d5eed42..017fb5764 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.java @@ -93,14 +93,6 @@ public abstract class ViewGroupManager } } - public void startViewTransition(T parent, View view) { - parent.startViewTransition(view); - } - - public void endViewTransition(T parent, View view) { - parent.endViewTransition(view); - } - /** * Returns whether this View type needs to handle laying out its own children instead of * deferring to the standard css-layout algorithm.