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
2015-12-11 22:44:38 -08:00
committed by Ahmed El-Helw
parent dfe5f9f762
commit 760422525e
14 changed files with 784 additions and 14 deletions

View File

@@ -54,6 +54,20 @@ package com.facebook.react.flat;
return this;
}
/**
* Returns a non-frozen shallow copy of AbstractDrawCommand as defined by {@link Object#clone()}.
*/
public final AbstractDrawCommand mutableCopy() {
try {
AbstractDrawCommand copy = (AbstractDrawCommand) super.clone();
copy.mFrozen = false;
return copy;
} catch (CloneNotSupportedException e) {
// should not happen since we implement Cloneable
throw new RuntimeException(e);
}
}
/**
* Returns whether this object was frozen and thus cannot be mutated.
*/