Fork v4 support library NestedScrollView to fix fling bug

Reviewed By: oli, lexs

Differential Revision: D2707733

fb-gh-sync-id: c9b375a6aa1010d60d21ca7500e862a6ff91a49b
This commit is contained in:
Andy Street authored and facebook-github-bot-7 committed 2015-12-03 11:15:51 -08:00
1 parent dd9c1e16ee
commit ecdc3429cd
2 files changed
+5 -1

No files matched your search

@@ -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(
@@ -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"))