callstack / callstack/react-native-pager-view

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

オープン
#495 コメント 5 件 リアクション 7 件 担当者 0 名 GitHub で見る
question
主要言語
TypeScript
スター
3.4k
フォーク
476
平均マージ
10日 21時間
マージ済み PR(30日)
2

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native
領域
mobile-dev
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。