Skip to content

Keep fullscreen player controls clear of system gesture area - #13965

Open
bharathan06 wants to merge 1 commit into
TeamNewPipe:devfrom
bharathan06:seekbar-gesture
Open

bharathan06 wants to merge 1 commit into
TeamNewPipe:devfrom
bharathan06:seekbar-gesture

Conversation

@bharathan06

@bharathan06 bharathan06 commented Oct 27, 2026 •

Copy link
Copy Markdown

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • With gesture navigation, dragging the seekbar in the fullscreen player often triggered the system home/recents gesture instead of seeking (7 of 10 drags on my device).
  • The player controls (playbackControlRoot) use fitsSystemWindows, so they are only padded by the navigation bar inset. With gesture navigation the system reserves a taller bottom area for its gestures (mandatorySystemGestures), which apps cannot opt out of. On my device that area is 32 dp, while the navigation bar inset is 0 dp ("Hide gesture guide bar" on) or 16 dp (off), so the seekbar sat inside it. While the controls are visible the player leaves immersive mode, so the gestures are active exactly when the seekbar can be dragged.
  • MainPlayerUi now sets an insets listener on playbackControlRoot: it keeps the default fitsSystemWindows handling and, only in fullscreen, raises the bottom padding to at least the bottom of the mandatory system gesture inset. The listener is removed in deinitListeners(). The value comes from the system, so it adapts per device. 1 file, +22 lines, no XML changes.
  • Nothing changes with 3-button navigation (no bottom gesture area in landscape; in portrait it equals the bar), outside fullscreen, in the popup/background players, or below Android 10 (AndroidX returns the system bar inset there). In gesture mode the controls now sit higher by however much the device needs (on my device 32 dp with the guide bar hidden, 16 dp with it shown); portrait fullscreen (vertical videos) is covered as well.

Before/After Screenshots/Screen Record

  • Before: dev build, gesture navigation, landscape fullscreen. Dragging the seekbar opens recents / switches app.

    newpipe-7929-before-dev-build.mp4
  • After: same setup. The controls sit above the gesture area and seekbar drags work.

    newpipe-7929-after-fix-landscape-drags.mp4
  • Before: release 0.29.1, vertical video (Short) in portrait fullscreen, gesture navigation. Dragging the seekbar opens recents / switches app.

    newpipe-7929-before-portrait-short.mp4
  • After: vertical video (Short) in portrait fullscreen, gesture navigation.

    newpipe-7929-after-fix-portrait-short-drags.mp4

Fixes the following issue(s)

Testing/QA

Devices
  • OnePlus Nord CE 3 Lite 5G (physical), OxygenOS 15, Android 15 / API 35: gesture navigation (guide bar hidden and shown) and 3-button navigation
  • Emulator (AOSP), Android 15 / API 35: gesture navigation with a punch-hole cutout, and a tablet-sized display
  • Emulator (AOSP), Android 6 / API 23
Steps for testing
  1. Enable gesture navigation. Open a horizontal video, go fullscreen in landscape, pause so the controls stay visible, and drag the seekbar repeatedly. Expected: it seeks every time and never triggers the home/recents gesture (before: 7/10 drags did; after: 0/10).

  2. Repeat with a vertical video (Short) in portrait fullscreen. Expected: same as step 1 (after: 0/10).

  3. Repeat step 1 with "Hide gesture guide bar" turned off. Expected: same as step 1 (before, the 16 dp padding left the seekbar partly inside the 32 dp gesture area; after: 0/10).

  4. Switch to 3-button navigation and repeat steps 1–2. Expected: layout identical to before.

  5. In fullscreen, show/hide the controls ~10 times, then enter and exit fullscreen a few times. Expected: no jumping, no leftover gap under the seekbar after exiting.

  6. In fullscreen, rotate the phone 180° to the other landscape side. Expected: the seekbar stays above the gesture area, the cutout padding moves to the new side, and drags still seek.

  7. Regression checks: brightness/volume swipes, double-tap seek, queue panel, captions, end screen, mini player (on the emulator), and split screen with NewPipe in the bottom half (embedded player). Expected: unchanged.

    newpipe-7929-after-fix-regression-overlays.mp4
  8. On the API 23 emulator, landscape fullscreen: padding is unchanged.

  9. Ran ./gradlew assembleContinuous lintContinuous testDebugUnitTest (155/155 tests, lint unchanged) and connectedCheck on API 35 and API 23 (25/25) locally.

Known older behaviour, not changed here: when entering fullscreen with a vertical video via the rotation button, the controls are shown before the new insets arrive, so they can visibly move up. This also happens without this change wherever the bottom padding is non-zero (e.g. 3-button navigation in portrait). Related: #4040 (closed).

APK for testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

I tried implementing the fix on my own, then got assistance from Claude. I reviewed the changes line by line, verified the root cause on my device, and tested for regressions.

@github-actions github-actions Bot added the size/small PRs with less than 50 changed lines label Oct 27, 2026
@sonarqubecloud

Copy link
Copy Markdown

@TobiGr TobiGr added player Issues related to any player (main, popup and background) UX Relating to improving user experience labels Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

player Issues related to any player (main, popup and background) size/small PRs with less than 50 changed lines UX Relating to improving user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System gesture navigation interferes with seek bar in full screen player

2 participants