React-native-swiper: onScrollBeginDrag not fired on Android

Created on 7 Aug 2017  路  4Comments  路  Source: leecade/react-native-swiper

This method is fired on iOS but not fired on Android. And I needed instead onMomentumScrollEnd because I would like to catch if the user is on the last index and try to swipe again I can show my Login screen. Any ideas why it's not fired on Android and whether there is a workaround?

I also tried to set react-native-swiper inside ScrollView as my idea was to catch when the user tries to swipe (event comming from the ScrollView) and knowing that I am on last slide using the onMomentumScrollEnd I know when to continue to Login. But the problem was that the ScrollView was taking all the events and swiper even didn't work. After a bit of research I found that on Android we should use NestedScrollView instead ScrollView (https://github.com/mohtada-h/react-native-nested-scrollview) but the problem was the same.

Need answer from author

Most helpful comment

Anyone else having this problem?

All 4 comments

Anyone else having this problem?

@zakster12
Some questions:

  • RN version ? RN Swiper version ?
  • Can your fork the project and create (or change) an example in which you reproduce your bug ?

It would help us a lot.
Thanks

I'm also seeing this. onScrollBeginDrag doesn't fire on android but it does on ios. RN 0.45.1, Swiper 1.5.12.

Hi there, i've made a fork with a workaround.

https://github.com/tezqa/react-native-swiper/commit/4f6554f440accbf502b2c0d074bc09b35ee809d1

I will submit a PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nomoreboredom picture nomoreboredom  路  3Comments

tokict picture tokict  路  3Comments

kylehagler picture kylehagler  路  3Comments

kliuj picture kliuj  路  3Comments

ghost picture ghost  路  3Comments