callstack / callstack/react-native-pager-view

How to disable ViewPager at ends so that screen gesture can take over?

Ouverte
#495 5 commentaires 7 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
TypeScript
Étoiles
3.4k
Forks
476
Merge moyen
10 j 21 h
PR mergées (30 j)
2

Description

I'm using react-navigation with the fullScreenSwipeEnabled option which allows to swipe back on the entire screen in iOS.

It's great except on the ViewPager, even when it's at the end it steals the touch and won't let the full-screen back to work.

Is there anyway to disable the viewpager at the ends where it has no more pages *so that* that the screen-back takes over?

It would essentially be like as if you have the pager nested inside another horizontal scrolling container and want it to give up the touch events when it reaches it's end.

I've played with onMoveShouldSetResponderCapture and onStartShouldSetResponder setting them to false and doesn't work.

It does work when the swipeEnabled is set to false but need to figure out when to temporarily disable it. Has anyone figured out which callbacks to hook into to determine if we can temporarily disable the pager swiping.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start by reproducing the interaction between react-navigation's fullScreenSwipeEnabled option and ViewPager at its first and last pages. Read the existing swipeEnabled and responder-related callbacks mentioned in the issue. Done means the pager gives the screen-back gesture control at an end while retaining paging between available pages.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
react-native
Domaine
mobile-dev
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.