mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Implement PlatformColor in Fabric Android
Summary: This diff implements PlatformColor in Fabric Android changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D29841461 fbshipit-source-id: 63a523626b021c634bc399e749b639b55730391a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8066bc9ff6
commit
cdce14f670
@@ -35,6 +35,7 @@ import com.facebook.debug.holder.PrinterHolder;
|
||||
import com.facebook.debug.tags.ReactDebugOverlayTags;
|
||||
import com.facebook.infer.annotation.ThreadConfined;
|
||||
import com.facebook.proguard.annotations.DoNotStripAny;
|
||||
import com.facebook.react.bridge.ColorPropConverter;
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
import com.facebook.react.bridge.NativeArray;
|
||||
import com.facebook.react.bridge.NativeMap;
|
||||
@@ -458,6 +459,14 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public int getColor(int surfaceId, ReadableMap platformColor) {
|
||||
ThemedReactContext context =
|
||||
mMountingManager.getSurfaceManagerEnforced(surfaceId, "getColor").getContext();
|
||||
Integer color = ColorPropConverter.getColor(platformColor, context);
|
||||
return color != null ? color : 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private long measure(
|
||||
int surfaceId,
|
||||
|
||||
Reference in New Issue
Block a user