Skip to content

Commit 7b77cc6

Browse files
ryancatfacebook-github-bot
authored andcommitted
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 (2cf2fdb) 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
1 parent eccbf9b commit 7b77cc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import android.animation.ObjectAnimator;
1818
import android.animation.PropertyValuesHolder;
1919
import android.animation.ValueAnimator;
20+
import android.content.Context;
2021
import android.graphics.Canvas;
2122
import android.graphics.Color;
2223
import android.graphics.Rect;
@@ -34,7 +35,6 @@
3435
import com.facebook.common.logging.FLog;
3536
import com.facebook.infer.annotation.Assertions;
3637
import com.facebook.react.R;
37-
import com.facebook.react.bridge.ReactContext;
3838
import com.facebook.react.bridge.WritableMap;
3939
import com.facebook.react.bridge.WritableNativeMap;
4040
import com.facebook.react.common.ReactConstants;
@@ -114,11 +114,11 @@ public class ReactScrollView extends ScrollView
114114
private int mLastStateUpdateScrollX = -1;
115115
private int mLastStateUpdateScrollY = -1;
116116

117-
public ReactScrollView(ReactContext context) {
117+
public ReactScrollView(Context context) {
118118
this(context, null);
119119
}
120120

121-
public ReactScrollView(ReactContext context, @Nullable FpsListener fpsListener) {
121+
public ReactScrollView(Context context, @Nullable FpsListener fpsListener) {
122122
super(context);
123123
mFpsListener = fpsListener;
124124
mReactBackgroundManager = new ReactViewBackgroundManager(this);

0 commit comments

Comments
 (0)