diff --git a/ReactAndroid/src/main/java/com/facebook/react/flat/StateBuilder.java b/ReactAndroid/src/main/java/com/facebook/react/flat/StateBuilder.java index 97e34aa00..54b536f9f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/flat/StateBuilder.java +++ b/ReactAndroid/src/main/java/com/facebook/react/flat/StateBuilder.java @@ -270,10 +270,25 @@ import com.facebook.react.uimanager.CatalystStylesDiffMap; for (int i = 0, childCount = node.getChildCount(); i != childCount; ++i) { FlatShadowNode child = (FlatShadowNode) node.getChildAt(i); + if (child.isVirtual()) { + markLayoutSeenRecursively(child); + continue; + } + processNodeAndCollectState(child, left, top, isAndroidView, needsCustomLayoutForChildren); } } + private void markLayoutSeenRecursively(FlatShadowNode node) { + if (node.hasNewLayout()) { + node.markLayoutSeen(); + } + + for (int i = 0, childCount = node.getChildCount(); i != childCount; ++i) { + markLayoutSeenRecursively((FlatShadowNode) node.getChildAt(i)); + } + } + /** * Collects state and updates View boundaries for a given node tree. */