Skip to content

Commit cec0de8

Browse files
joevilchesfacebook-github-bot
authored andcommitted
Change Scroller getter to protected (#52387)
Summary: Pull Request resolved: #52387 I would like to grab this in a subclass but unfortunately can't. It is kinda jank since this is a val obtained via reflection, but I figure this is better than copy and paste. I think that I could also expose a function that uses this scroller the way I want it to. Let me know if there are strong objections here Changelog: [Internal] Reviewed By: rozele Differential Revision: D77684599 fbshipit-source-id: 6f02c1da5135c1cf34fa1483542e06bf8f0be75e
1 parent 097d482 commit cec0de8

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/react-native/ReactAndroid/api/ReactAndroid.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5746,6 +5746,7 @@ public class com/facebook/react/views/scroll/ReactScrollView : android/widget/Sc
57465746
public fun getFlingAnimator ()Landroid/animation/ValueAnimator;
57475747
public fun getFlingExtrapolatedDistance (I)I
57485748
public fun getLastScrollDispatchTime ()J
5749+
protected fun getOverScrollerFromParent ()Landroid/widget/OverScroller;
57495750
public fun getOverflow ()Ljava/lang/String;
57505751
public fun getOverflowInset ()Landroid/graphics/Rect;
57515752
public fun getPointerEvents ()Lcom/facebook/react/uimanager/PointerEvents;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
165165
}
166166

167167
@Nullable
168-
private OverScroller getOverScrollerFromParent() {
168+
protected OverScroller getOverScrollerFromParent() {
169169
OverScroller scroller;
170170

171171
if (!sTriedToGetScrollerField) {

0 commit comments

Comments
 (0)