cesardeazevedo / react-native-nested-scroll-view

react-native wrapper for android NestedScrollView
MIT License
88 stars 36 forks source link

Can not resolve symbol ScrollEventType.ANIMATION_END #5

Closed ivan-magda closed 6 years ago

ivan-magda commented 6 years ago

Hey, @cesardeazevedo !

In React Native 0.48.3 the ScrollEventType does not has ANIMATION_END. This produces build time error.

Now it looks like this:

public enum ScrollEventType {
  BEGIN_DRAG("topScrollBeginDrag"),
  END_DRAG("topScrollEndDrag"),
  SCROLL("topScroll"),
  MOMENTUM_BEGIN("topMomentumScrollBegin"),
  MOMENTUM_END("topMomentumScrollEnd");
...
}

After deleting usage of this enum case I was able to successfully build and run project.

public static Map createExportedCustomDirectEventTypeConstants() {
    return MapBuilder.builder()
        .put(ScrollEventType.SCROLL.getJSEventName(), MapBuilder.of("registrationName", "onScroll"))
        .put(ScrollEventType.BEGIN_DRAG.getJSEventName(), MapBuilder.of("registrationName", "onScrollBeginDrag"))
        .put(ScrollEventType.END_DRAG.getJSEventName(), MapBuilder.of("registrationName", "onScrollEndDrag"))
        .put(ScrollEventType.MOMENTUM_BEGIN.getJSEventName(), MapBuilder.of("registrationName", "onMomentumScrollBegin"))
        .put(ScrollEventType.MOMENTUM_END.getJSEventName(), MapBuilder.of("registrationName", "onMomentumScrollEnd"))
        .build();
  }

Please take a look at this problem and do appropriate updates.

Thanks!

cesardeazevedo commented 6 years ago

Thanks for report, the current version was tested with 0.47, i will try to update to work with 0.48.3 it today.