Don't wrap unknown virtual nodes with AndroidView

Summary: Currently, we wrap all unknown shadow nodes with AndroidView. This works great, except when the shadow node is virtual, i.e. it *doesn't* mount to a View. In this case, we just need to keep it in the hierarchy as is. Fixes ARTSurfaceView not working correctly in groups.

Reviewed By: ahmedre

Differential Revision: D2933325
This commit is contained in:
Denis Koroskin
2016-02-12 14:28:18 -08:00
committed by Ahmed El-Helw
parent 4bff818706
commit 8702a75b96
2 changed files with 24 additions and 14 deletions

View File

@@ -79,7 +79,9 @@ import com.facebook.react.uimanager.ViewManager;
@Override
public void addChildAt(CSSNode child, int i) {
super.addChildAt(child, i);
((FlatShadowNode) child).forceMountToView();
if (child instanceof FlatShadowNode) {
((FlatShadowNode) child).forceMountToView();
}
}
@Override