mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-19 00:46:47 +08:00
Add support for setChildren
Summary: This adds support for UIManager.setChildren on Android like D2757388 added for iOS. Reviewed By: andreicoman11 Differential Revision: D3235369 fb-gh-sync-id: b538556ec4abdb606f9be26d1b74734046bca0cd fbshipit-source-id: b538556ec4abdb606f9be26d1b74734046bca0cd
This commit is contained in:
committed by
Facebook Github Bot 1
parent
3f0207d7b5
commit
3a5457cd7c
@@ -180,6 +180,25 @@ public class UIViewOperationQueue {
|
||||
}
|
||||
}
|
||||
|
||||
private final class SetChildrenOperation extends ViewOperation {
|
||||
|
||||
private final ReadableArray mChildrenTags;
|
||||
|
||||
public SetChildrenOperation(
|
||||
int tag,
|
||||
ReadableArray childrenTags) {
|
||||
super(tag);
|
||||
mChildrenTags = childrenTags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
mNativeViewHierarchyManager.setChildren(
|
||||
mTag,
|
||||
mChildrenTags);
|
||||
}
|
||||
}
|
||||
|
||||
private final class UpdateViewExtraData extends ViewOperation {
|
||||
|
||||
private final Object mExtraData;
|
||||
@@ -640,6 +659,13 @@ public class UIViewOperationQueue {
|
||||
new ManageChildrenOperation(reactTag, indicesToRemove, viewsToAdd, tagsToDelete));
|
||||
}
|
||||
|
||||
public void enqueueSetChildren(
|
||||
int reactTag,
|
||||
ReadableArray childrenTags) {
|
||||
mOperations.add(
|
||||
new SetChildrenOperation(reactTag, childrenTags));
|
||||
}
|
||||
|
||||
public void enqueueRegisterAnimation(Animation animation) {
|
||||
mOperations.add(new RegisterAnimationOperation(animation));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user