Add support for RCTImageView in FlatShadowHierarchyManager

Summary: @public This patch adds basic support for RCTImageView (only 'src', 'tintColor' and 'resizeMode' properties are supported for now), and a concept of AttachDetachListener that is required to support it to FlatUIImplementations.

Reviewed By: sriramramani

Differential Revision: D2564389
This commit is contained in:
Denis Koroskin authored and Ahmed El-Helw committed 2016-12-19 13:40:15 -08:00
1 parent dfe5f9f762
commit 760422525e
14 files changed
+784 -14

No files matched your search

@@ -28,4 +28,15 @@ import com.facebook.react.uimanager.LayoutShadowNode;
float bottom) {
// do nothing yet.
}
/**
* Marks root node as updated to trigger a StateBuilder pass to collect DrawCommands for the node
* tree. Use it when FlatShadowNode is updated but doesn't require a layout pass (e.g. background
* color is changed).
*/
protected final void invalidate() {
// getRootNode() returns an ReactShadowNode, which is guarantied to be a FlatRootShadowNode.
FlatRootShadowNode rootNode = (FlatRootShadowNode) getRootNode();
rootNode.markUpdated(true);
}
}