Skip to content

fix: podcast player panel draws under system navigation bar in main feed view - #1669

Open
mvanhorn wants to merge 1 commit into
nextcloud:masterfrom
mvanhorn:fix/1647-podcast-panel-edge-to-edge-insets
Open

fix: podcast player panel draws under system navigation bar in main feed view#1669
mvanhorn wants to merge 1 commit into
nextcloud:masterfrom
mvanhorn:fix/1647-podcast-panel-edge-to-edge-insets

Conversation

@mvanhorn

Copy link
Copy Markdown

Summary

The collapsed podcast playback panel no longer draws underneath the system navigation bar when playback starts from the main feed view. The bottom system-bar inset is now handled in the shared podcast panel code, so both host activities behave identically under edge-to-edge.

Why this matters

In #1647, @yukijoou narrowed the repro to playback started from the main feed without opening an article, which is why it did not reproduce at first: activity_news_detail.xml sets fitsSystemWindows on its root CoordinatorLayout, but activity_newsreader.xml only sets it on an inner CoordinatorLayout that does not contain the PodcastSlidingUpPanelLayout, leaving the panel flush with the physical screen bottom.

Changes

  • An OnApplyWindowInsetsListener on the sliding panel raises the collapsed panel height by the system-bars bottom inset and pads the collapsed header so controls are not clipped.
  • NewsDetailActivity already consumes the inset via fitsSystemWindows, so the listener receives a zero bottom inset there and behavior is unchanged. The root of activity_newsreader.xml intentionally keeps its existing edge-to-edge inset handling.

Testing

Static review against both layout variants (portrait and sw600dp-land); the inset math only adds the reported bottom inset on top of the existing 68dp panel height. A device pass on API 35 edge-to-edge is the remaining verification, which CI/screenshots from the reporter's repro path will exercise.

Fixes #1647

Signed-off-by: Matt Van Horn 455140+mvanhorn@users.noreply.github.com

…eed view

Fixes nextcloud#1647

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@David-Development

Copy link
Copy Markdown
Member

@mvanhorn Thanks for the contribution πŸŽ‰

I gave it a spin on amy Pixel 9 Pro (Android 16). The bottom inset is fixed now β€” the collapsed mini-player and the expanded player's bottom controls sit above the navigation bar correctly. πŸ‘

But the top is still broken: when the panel is expanded, the player header/title is drawn under the status bar β€” which is part of what #1647 reported. The change only applies systemBars.bottom; there's no top inset. In activity_newsreader.xml the panel isn't inset at the top at all, unlike activity_news_detail.xml whose root CoordinatorLayout has fitsSystemWindows="true" (+ a top margin), so its expanded player clears the status bar.

Could you also handle the top inset for the expanded state? One thing to watch: the top inset should only apply when expanded β€” padding the root top unconditionally will push the header down and clip it in the collapsed mini-player. The existing onPanelSlideListener (with its slide offset) is probably the cleanest hook for that.

Context for the bigger picture: since the SDK 35 edge-to-edge switch we lean on fitsSystemWindows across most activities as a workaround, and the podcast panel in the feed is the spot that isn't covered. Longer term I'd like to drop fitsSystemWindows and handle insets consistently across activities β€” but that's out of scope here; handling the top inset when expanded should be enough to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Podcast player activity draws under system UI elements

2 participants