mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
Change ViewManager.measure() to use Context instead of ReactContext
Summary: It seems like ReactContext isn't actually needed in measure functions. Changing the signature of ViewManager.measure() to take a Context instead. Reviewed By: lunaleaps Differential Revision: D14940330 fbshipit-source-id: b29987fd1d7f9c191a5f26138151082ca61cb351
This commit is contained in:
committed by
Facebook Github Bot
parent
12d58d431a
commit
f81d77c102
@@ -334,7 +334,7 @@ public class MountingManager {
|
||||
|
||||
@AnyThread
|
||||
public long measure(
|
||||
ReactContext context,
|
||||
Context context,
|
||||
String componentName,
|
||||
ReadableMap localData,
|
||||
ReadableMap props,
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
package com.facebook.react.uimanager;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.BaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
@@ -234,7 +235,7 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
|
||||
}
|
||||
|
||||
public long measure(
|
||||
ReactContext context,
|
||||
Context context,
|
||||
ReadableMap localData,
|
||||
ReadableMap props,
|
||||
float width,
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
package com.facebook.react.views.slider;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.LayerDrawable;
|
||||
@@ -196,7 +197,7 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider> {
|
||||
|
||||
@Override
|
||||
public long measure(
|
||||
ReactContext context,
|
||||
Context context,
|
||||
ReadableMap localData,
|
||||
ReadableMap props,
|
||||
float width,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
package com.facebook.react.views.text;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Layout;
|
||||
import android.text.Spannable;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
@@ -112,7 +113,7 @@ public class ReactTextViewManager
|
||||
|
||||
@Override
|
||||
public long measure(
|
||||
ReactContext context,
|
||||
Context context,
|
||||
ReadableMap localData,
|
||||
ReadableMap props,
|
||||
float width,
|
||||
|
||||
@@ -19,7 +19,6 @@ import android.text.Spanned;
|
||||
import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import android.util.LruCache;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
@@ -176,7 +175,7 @@ public class TextLayoutManager {
|
||||
}
|
||||
|
||||
public static long measureText(
|
||||
ReactContext context,
|
||||
Context context,
|
||||
ReadableMap attributedString,
|
||||
ReadableMap paragraphAttributes,
|
||||
float width,
|
||||
|
||||
Reference in New Issue
Block a user