mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 04:24:15 +00:00
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:
parent
fc42f9cca2
commit
05b75b9ebf
@ -373,12 +373,11 @@ public class NativeViewHierarchyManager {
|
|||||||
if (mLayoutAnimationEnabled &&
|
if (mLayoutAnimationEnabled &&
|
||||||
mLayoutAnimator.shouldAnimateLayout(viewToRemove) &&
|
mLayoutAnimator.shouldAnimateLayout(viewToRemove) &&
|
||||||
arrayContains(tagsToDelete, viewToRemove.getId())) {
|
arrayContains(tagsToDelete, viewToRemove.getId())) {
|
||||||
// Display the view in the parent after removal for the duration of the layout animation,
|
// The view will be removed and dropped by the 'delete' layout animation
|
||||||
// but pretend that it doesn't exist when calling other ViewGroup methods.
|
// instead, so do nothing
|
||||||
viewManager.startViewTransition(viewToManage, viewToRemove);
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
viewManager.removeViewAt(viewToManage, indexToRemove);
|
viewManager.removeViewAt(viewToManage, indexToRemove);
|
||||||
|
}
|
||||||
|
|
||||||
lastIndexToRemove = indexToRemove;
|
lastIndexToRemove = indexToRemove;
|
||||||
}
|
}
|
||||||
@ -424,9 +423,7 @@ public class NativeViewHierarchyManager {
|
|||||||
mLayoutAnimator.deleteView(viewToDestroy, new LayoutAnimationListener() {
|
mLayoutAnimator.deleteView(viewToDestroy, new LayoutAnimationListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd() {
|
public void onAnimationEnd() {
|
||||||
// Already removed from the ViewGroup, we can just end the transition here to
|
viewManager.removeView(viewToManage, viewToDestroy);
|
||||||
// release the child.
|
|
||||||
viewManager.endViewTransition(viewToManage, viewToDestroy);
|
|
||||||
dropView(viewToDestroy);
|
dropView(viewToDestroy);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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
|
* Returns whether this View type needs to handle laying out its own children instead of
|
||||||
* deferring to the standard css-layout algorithm.
|
* deferring to the standard css-layout algorithm.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user