mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add interface for ReactShadowNode
Reviewed By: AaaChiuuu Differential Revision: D5871546 fbshipit-source-id: 7c338fe3b747a79377a54867c789028d221b3dd5
This commit is contained in:
committed by
Facebook Github Bot
parent
6334ed2ff3
commit
08befb730b
@@ -15,10 +15,9 @@ import android.graphics.Point;
|
||||
import android.view.Display;
|
||||
import android.view.Surface;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.facebook.react.uimanager.ReactShadowNode;
|
||||
import com.facebook.yoga.YogaValue;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
import com.facebook.yoga.YogaUnit;
|
||||
import com.facebook.yoga.YogaValue;
|
||||
|
||||
/**
|
||||
* FlatReactModalShadowNode
|
||||
@@ -43,11 +42,11 @@ class FlatReactModalShadowNode extends FlatShadowNode implements AndroidView {
|
||||
|
||||
/**
|
||||
* We need to set the styleWidth and styleHeight of the one child (represented by the <View/>
|
||||
* within the <RCTModalHostView/> in Modal.js. This needs to fill the entire window.
|
||||
* within the <RCTModalHostView/> in Modal.js. This needs to fill the entire window.
|
||||
*/
|
||||
@Override
|
||||
@TargetApi(16)
|
||||
public void addChildAt(ReactShadowNode child, int i) {
|
||||
public void addChildAt(ReactShadowNodeImpl child, int i) {
|
||||
super.addChildAt(child, i);
|
||||
|
||||
Context context = getThemedContext();
|
||||
|
||||
@@ -9,18 +9,17 @@
|
||||
|
||||
package com.facebook.react.flat;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import android.graphics.Rect;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||
import com.facebook.react.uimanager.OnLayoutEvent;
|
||||
import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
||||
import com.facebook.react.uimanager.ReactShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
import com.facebook.react.uimanager.ReactStylesDiffMap;
|
||||
import com.facebook.react.uimanager.ViewProps;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* FlatShadowNode is a base class for all shadow node used in FlatUIImplementation. It extends
|
||||
@@ -213,7 +212,7 @@ import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addChildAt(ReactShadowNode child, int i) {
|
||||
public void addChildAt(ReactShadowNodeImpl child, int i) {
|
||||
super.addChildAt(child, i);
|
||||
if (mForceMountChildrenToView && child instanceof FlatShadowNode) {
|
||||
((FlatShadowNode) child).forceMountToView();
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
package com.facebook.react.flat;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.uimanager.ReactShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Helper class that sorts moveFrom/moveTo arrays in lockstep.
|
||||
@@ -23,7 +23,7 @@ import com.facebook.react.uimanager.ReactShadowNode;
|
||||
private @Nullable ReadableArray mMoveTo;
|
||||
private int mSize;
|
||||
private int[] mMapping = new int[8];
|
||||
private ReactShadowNode[] mChildren = new ReactShadowNode[4];
|
||||
private ReactShadowNode[] mChildren = new ReactShadowNodeImpl[4];
|
||||
|
||||
/**
|
||||
* Retuns size of underlying moveTo/moveFrom arrays
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package com.facebook.react.flat;
|
||||
|
||||
import com.facebook.react.uimanager.ReactShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
import com.facebook.react.uimanager.ReactStylesDiffMap;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
import com.facebook.react.uimanager.UIViewOperationQueue;
|
||||
@@ -18,7 +19,6 @@ import com.facebook.react.uimanager.ViewManager;
|
||||
import com.facebook.yoga.YogaMeasureFunction;
|
||||
import com.facebook.yoga.YogaUnit;
|
||||
import com.facebook.yoga.YogaValue;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/* package */ final class NativeViewWrapper extends FlatShadowNode implements AndroidView {
|
||||
@@ -95,7 +95,7 @@ import javax.annotation.Nullable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addChildAt(ReactShadowNode child, int i) {
|
||||
public void addChildAt(ReactShadowNodeImpl child, int i) {
|
||||
super.addChildAt(child, i);
|
||||
if (mForceMountGrandChildrenToView && child instanceof FlatShadowNode) {
|
||||
((FlatShadowNode) child).forceMountChildrenToView();
|
||||
|
||||
@@ -9,18 +9,16 @@
|
||||
|
||||
package com.facebook.react.flat;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.react.uimanager.ReactShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
import com.facebook.react.uimanager.ViewProps;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* RCTVirtualText is a {@link FlatTextShadowNode} that can contain font styling information.
|
||||
@@ -40,7 +38,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
private ShadowStyleSpan mShadowStyleSpan = ShadowStyleSpan.INSTANCE;
|
||||
|
||||
@Override
|
||||
public void addChildAt(ReactShadowNode child, int i) {
|
||||
public void addChildAt(ReactShadowNodeImpl child, int i) {
|
||||
super.addChildAt(child, i);
|
||||
notifyChanged(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user