mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
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:
committed by
Ahmed El-Helw
parent
dfe5f9f762
commit
760422525e
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user