mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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.  Closes https://github.com/facebook/react-native/pull/7171 Differential Revision: D3352450 Pulled By: astreet fbshipit-source-id: 233efa041626eb26d99511d12a924e54a10f96cc
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user