mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Change Vertical ScrollView to take Context instead of ReactContext
Summary: The `ReactScrollView.java` constructor is using `ReactContext` instead of `Context`, which is inconsistent to the horizontal scroll view. This is the result from D3863966 (https://github.com/facebook/react-native/commit/2cf2fdbc04bc5309f6942ed464ad61cd06a26ce8) when an OSS issue needs to be addressed. That issue and all call sites to use the `ReactContext` are deprecated now. Revert this back to use `Context` to be less restrictive. Changelog: [Android][Fixed] - Revert `ReactScrollView` to use `Context` instead of `ReactContext` in the constructor to be less restrictive. Reviewed By: javache Differential Revision: D31819799 fbshipit-source-id: 3f00d64850aebd2e20615033b2e1f1c721fed37e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
eccbf9b5cb
commit
7b77cc637e
@@ -17,6 +17,7 @@ import android.animation.Animator;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.PropertyValuesHolder;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
@@ -34,7 +35,6 @@ import androidx.core.view.ViewCompat;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.R;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.bridge.WritableNativeMap;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
@@ -114,11 +114,11 @@ public class ReactScrollView extends ScrollView
|
||||
private int mLastStateUpdateScrollX = -1;
|
||||
private int mLastStateUpdateScrollY = -1;
|
||||
|
||||
public ReactScrollView(ReactContext context) {
|
||||
public ReactScrollView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public ReactScrollView(ReactContext context, @Nullable FpsListener fpsListener) {
|
||||
public ReactScrollView(Context context, @Nullable FpsListener fpsListener) {
|
||||
super(context);
|
||||
mFpsListener = fpsListener;
|
||||
mReactBackgroundManager = new ReactViewBackgroundManager(this);
|
||||
|
||||
Reference in New Issue
Block a user