callstack / callstack/react-native-pager-view

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

Offen
#495 5 Kommentare 7 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
TypeScript
Sterne
3.4k
Forks
476
Ø Merge
10 T. 21 Std.
Gemergte PRs (30 T.)
2

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
react-native
Bereich
mobile-dev
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.