diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java index 12f5606fc..c8e7fa22e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java @@ -24,7 +24,7 @@ public class ReactScrollViewHelper { /** * Shared by {@link ReactScrollView} and {@link ReactHorizontalScrollView}. */ - /* package */ static void emitScrollEvent(ViewGroup scrollView, int scrollX, int scrollY) { + public static void emitScrollEvent(ViewGroup scrollView, int scrollX, int scrollY) { View contentView = scrollView.getChildAt(0); ReactContext reactContext = (ReactContext) scrollView.getContext(); reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher().dispatchEvent( diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java index 2c3363f8e..6de7da6bc 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java @@ -81,6 +81,10 @@ public class ReactScrollViewManager @Override public @Nullable Map getExportedCustomDirectEventTypeConstants() { + return createExportedCustomDirectEventTypeConstants(); + } + + public static Map createExportedCustomDirectEventTypeConstants() { return MapBuilder.builder() .put(ScrollEvent.EVENT_NAME, MapBuilder.of("registrationName", "onScroll")) .put("topScrollBeginDrag", MapBuilder.of("registrationName", "onScrollBeginDrag"))