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:
parent
dd9c1e16ee
commit
ecdc3429cd
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue