File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -621,6 +621,16 @@ export default class extends Component {
621621 this . scrollView = view ;
622622 }
623623
624+ onPageScrollStateChanged = state => {
625+ switch ( state ) {
626+ case 'dragging' :
627+ return this . onScrollBegin ( ) ;
628+ case 'idle' :
629+ case 'settling' :
630+ if ( this . props . onTouchEnd ) this . props . onTouchEnd ( ) ;
631+ }
632+ }
633+
624634 renderScrollView = pages => {
625635 if ( Platform . OS === 'ios' ) {
626636 return (
@@ -641,6 +651,7 @@ export default class extends Component {
641651 < ViewPagerAndroid ref = { this . refScrollView }
642652 { ...this . props }
643653 initialPage = { this . props . loop ? this . state . index + 1 : this . state . index }
654+ onPageScrollStateChanged = { this . onPageScrollStateChanged }
644655 onPageSelected = { this . onScrollEnd }
645656 key = { pages . length }
646657 style = { [ styles . wrapperAndroid , this . props . style ] } >
You can’t perform that action at this time.
0 commit comments