callstack / callstack/react-native-pager-view

Rendering in ScrollView makes gestures hard to be picked up on Android

Open
#606 5 comments 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.4k
Forks
476
Avg merge
10d 21h
Merged PRs (30d)
2

Description

## Environment

Android
react-native: 0.66.4
react-native-pager-view: 5.4.15

## Description

Running into a couple of issues when rendering pager view inside ScrollView on Android.
1. Swiping diagonally at a small angle - 10-20 degrees - gets captured by scrollview and not pager view.
2. Swiping horizontally while the the scroll still has momentum doesn't get captured by pager view.3.

These issues combined make a terrible user experience on Android.

| Diagonal swipe | Scroll momentum |
|:--------------------------:|:-------------------------:|
| ![ezgif-3-9b2f3ca01b](https://user-images.githubusercontent.com/10097195/190983276-7d64ef2a-5a50-4c4e-81b5-0a164c159731.gif) | ![ezgif-3-6767ceb422](https://user-images.githubusercontent.com/10097195/190983313-d325c31e-91ed-491f-835b-84d3940307e1.gif) |

## Reproducible Demo

https://snack.expo.dev/D1avOzeAs?platform=android

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.