callstack / callstack/react-native-pager-view

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

Aperta
#495 5 commenti 7 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
TypeScript
Stelle
3.4k
Fork
476
Merge medio
10g 21h
PR unite (30g)
2

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react-native
Ambito
mobile-dev
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.