Add support for delete animation in LayoutAnimation on Android

Summary:
Android follow up to #6779

**Test plan**
Tested add/removing views in the UIExample explorer with and without setting a LayoutAnimation. Tested that user interation during the animation is properly disabled.

![layout-anim-2](https://cloud.githubusercontent.com/assets/2677334/14760549/d60ebe2a-0914-11e6-8f17-ea04d8bf813b.gif)
Closes https://github.com/facebook/react-native/pull/7171

Differential Revision: D3352450

Pulled By: astreet

fbshipit-source-id: 233efa041626eb26d99511d12a924e54a10f96cc
This commit is contained in:
Janic Duplessis authored and Facebook Github Bot 9 committed 2016-05-26 05:28:26 -07:00
1 parent 4879f88a75
commit 0fb5ccf6af
7 files changed
+138 -10

No files matched your search

@@ -48,6 +48,15 @@ public abstract class ViewGroupManager <T extends ViewGroup>
parent.removeViewAt(index);
}
public void removeView(T parent, View view) {
for (int i = 0; i < getChildCount(parent); i++) {
if (getChildAt(parent, i) == view) {
removeViewAt(parent, i);
break;
}
}
}
public void removeAllViews(T parent) {
for (int i = getChildCount(parent) - 1; i >= 0; i--) {
removeViewAt(parent, i);