Revert D7612904: [react-native][PR] Fix view indices with Android LayoutAnimation

Differential Revision:
D7612904

Original commit changeset: a04cf47ab80e

fbshipit-source-id: fd22a1243f770aab486f6c6d09726547c92841c0
This commit is contained in:
David Vacca 2018-04-23 11:13:07 -07:00 committed by Facebook Github Bot
parent fc42f9cca2
commit 05b75b9ebf
2 changed files with 5 additions and 16 deletions

View File

@ -373,12 +373,11 @@ 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);
}
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);
}
});

View File

@ -93,14 +93,6 @@ public abstract class ViewGroupManager <T extends ViewGroup>
}
}
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.