Rename enums
Summary: new name, start by renaming enums Differential Revision: D4244360
This commit is contained in:
parent
75561f7f78
commit
b7c2cfcb34
|
@ -9,7 +9,7 @@
|
|||
|
||||
package com.facebook.react.flat;
|
||||
|
||||
import com.facebook.csslayout.CSSMeasureMode;
|
||||
import com.facebook.csslayout.YogaMeasureMode;
|
||||
import com.facebook.csslayout.CSSNodeAPI;
|
||||
import com.facebook.csslayout.MeasureOutput;
|
||||
import com.facebook.react.uimanager.BaseViewManager;
|
||||
|
@ -26,9 +26,9 @@ import com.facebook.react.views.art.ARTSurfaceView;
|
|||
public long measure(
|
||||
CSSNodeAPI node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
YogaMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode) {
|
||||
YogaMeasureMode heightMode) {
|
||||
throw new IllegalStateException("SurfaceView should have explicit width and height set");
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.facebook.csslayout.CSSDirection;
|
||||
import com.facebook.csslayout.YogaDirection;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
|
@ -115,7 +115,7 @@ public class FlatUIImplementation extends UIImplementation {
|
|||
ReactShadowNode node = new FlatRootShadowNode();
|
||||
I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
|
||||
if (sharedI18nUtilInstance.isRTL(mReactContext)) {
|
||||
node.setLayoutDirection(CSSDirection.RTL);
|
||||
node.setLayoutDirection(YogaDirection.RTL);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ import android.text.Layout;
|
|||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
|
||||
import com.facebook.csslayout.CSSDirection;
|
||||
import com.facebook.csslayout.CSSMeasureMode;
|
||||
import com.facebook.csslayout.YogaDirection;
|
||||
import com.facebook.csslayout.YogaMeasureMode;
|
||||
import com.facebook.csslayout.CSSNodeAPI;
|
||||
import com.facebook.csslayout.MeasureOutput;
|
||||
import com.facebook.fbui.textlayoutbuilder.TextLayoutBuilder;
|
||||
|
@ -76,9 +76,9 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|||
public long measure(
|
||||
CSSNodeAPI node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
YogaMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode) {
|
||||
YogaMeasureMode heightMode) {
|
||||
|
||||
CharSequence text = getText();
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
|
@ -155,7 +155,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|||
if (mDrawCommand == null) {
|
||||
mDrawCommand = new DrawTextLayout(createTextLayout(
|
||||
(int) Math.ceil(right - left),
|
||||
CSSMeasureMode.EXACTLY,
|
||||
YogaMeasureMode.EXACTLY,
|
||||
TextUtils.TruncateAt.END,
|
||||
true,
|
||||
mNumberOfLines,
|
||||
|
@ -276,7 +276,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|||
}
|
||||
|
||||
public Layout.Alignment getAlignment() {
|
||||
boolean isRtl = getLayoutDirection() == CSSDirection.RTL;
|
||||
boolean isRtl = getLayoutDirection() == YogaDirection.RTL;
|
||||
switch (mAlignment) {
|
||||
// Layout.Alignment.RIGHT and Layout.Alignment.LEFT are @hide :(
|
||||
case Gravity.LEFT:
|
||||
|
@ -295,7 +295,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|||
|
||||
private static Layout createTextLayout(
|
||||
int width,
|
||||
CSSMeasureMode widthMode,
|
||||
YogaMeasureMode widthMode,
|
||||
TextUtils.TruncateAt ellipsize,
|
||||
boolean shouldIncludeFontPadding,
|
||||
int maxLines,
|
||||
|
|
|
@ -18,7 +18,7 @@ import android.util.TypedValue;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.facebook.csslayout.CSSMeasureMode;
|
||||
import com.facebook.csslayout.YogaMeasureMode;
|
||||
import com.facebook.csslayout.CSSNodeAPI;
|
||||
import com.facebook.csslayout.MeasureOutput;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
|
@ -78,9 +78,9 @@ public class RCTTextInput extends RCTVirtualText implements AndroidView, CSSNode
|
|||
public long measure(
|
||||
CSSNodeAPI node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
YogaMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode) {
|
||||
YogaMeasureMode heightMode) {
|
||||
// measure() should never be called before setThemedContext()
|
||||
EditText editText = Assertions.assertNotNull(mEditText);
|
||||
|
||||
|
|
Loading…
Reference in New Issue