leecade / leecade/react-native-swiper

onScrollBeginDrag not fired on Android

Open
#489 4 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Need answer from author
Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android behavior for onScrollBeginDrag in react-native-swiper and compare it with iOS, including the interaction with ScrollView and NestedScrollView described in the report. Trace the scroll event path and determine whether the callback can fire on Android or whether a reliable workaround is needed; done means documenting or implementing behavior that detects a swipe attempt at the last slide.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.