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 коммит произвёл facebook-github-bot-7
Родитель dd9c1e16ee
Коммит ecdc3429cd
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

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