Add support for more Scroll Events to Android

Summary:
public
This adds support for
onScrollBeginDrag/End
onMomentumScrolBegin/End

Reviewed By: astreet

Differential Revision: D2739035

fb-gh-sync-id: 2a49d1df54e5f5cd82008bdb0ffde0881ba39aff
This commit is contained in:
Dave Miller
2015-12-16 00:47:43 -08:00
committed by facebook-github-bot-7
parent 1fabd86048
commit fcf0431d25
10 changed files with 214 additions and 16 deletions

View File

@@ -234,6 +234,13 @@ var ScrollView = React.createClass({
* @platform ios
*/
scrollsToTop: PropTypes.bool,
/**
* When true, momentum events will be sent from Android
* This is internal and set automatically by the framework if you have
* onMomentumScrollBegin or onMomentumScrollEnd set on your ScrollView
* @platform android
*/
sendMomentumEvents: PropTypes.bool,
/**
* When true, shows a horizontal scroll indicator.
*/
@@ -434,6 +441,7 @@ var ScrollView = React.createClass({
onResponderTerminate: this.scrollResponderHandleTerminate,
onResponderRelease: this.scrollResponderHandleResponderRelease,
onResponderReject: this.scrollResponderHandleResponderReject,
sendMomentumEvents: (this.props.onMomentumScrollBegin || this.props.onMomentumScrollEnd) ? true : false,
};
var onRefreshStart = this.props.onRefreshStart;