material-components / material-components/material-components-android
[BottomSheetBehavior] Scrolling within a ViewPager2
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** Full description of issue here
I have a ViewPager2 setup with multiple fragments, in one of them I have a persistent bottom sheet.
I'm having an issue whenever I try and drag the bottom sheet, and the parent viewpager will intercept the gesture, interrupting the bottom sheet drag whenever there is any horizontal movement in the gesture.
https://user-images.githubusercontent.com/17648579/110108809-8a19fe80-7da4-11eb-9ca4-a0f78e0758b2.mp4
**Expected behavior:**
When dragging the bottom sheet, regardless of direction, ViewPager (or any other parents) can't intercept it. Similar behavior to RecyclerView
**Android API version:**
29
**Material Library version:**
Tried both 1.3.0 and 1.4.0-alpha01
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported drag in the ViewPager2 setup with a persistent BottomSheetBehavior, using the linked video and the stated Android API and Material Library versions as context. Trace how horizontal gesture interception interrupts the bottom-sheet drag, then verify that ViewPager2 or another parent no longer intercepts the gesture in any direction, matching the expected RecyclerView-like behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100