Skip to content

Commit

Permalink
Revert D7612904: [react-native][PR] Fix view indices with Android Lay…
Browse files Browse the repository at this point in the history
…outAnimation

Differential Revision:
D7612904

Original commit changeset: a04cf47ab80e

fbshipit-source-id: fd22a1243f770aab486f6c6d09726547c92841c0
  • Loading branch information
mdvacca authored and facebook-github-bot committed Apr 23, 2018
1 parent fc42f9c commit 05b75b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,12 @@ public synchronized void manageChildren(
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;
}
}
Expand Down Expand Up @@ -424,9 +423,7 @@ public synchronized void manageChildren(
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);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ public void removeAllViews(T parent) {
}
}

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.
Expand Down

0 comments on commit 05b75b9

Please sign in to comment.