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 2015-12-03 09:24:01 -08:00 committed by facebook-github-bot-7
parent dd9c1e16ee
commit ecdc3429cd
2 changed files with 5 additions and 1 deletions

View File

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

View File

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