fix: podcast player panel draws under system navigation bar in main feed view - #1669
fix: podcast player panel draws under system navigation bar in main feed view#1669mvanhorn wants to merge 1 commit into
Conversation
β¦eed view Fixes nextcloud#1647 Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
|
@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. |
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.xmlsetsfitsSystemWindowson its root CoordinatorLayout, butactivity_newsreader.xmlonly sets it on an inner CoordinatorLayout that does not contain thePodcastSlidingUpPanelLayout, leaving the panel flush with the physical screen bottom.Changes
OnApplyWindowInsetsListeneron the sliding panel raises the collapsed panel height by the system-bars bottom inset and pads the collapsed header so controls are not clipped.NewsDetailActivityalready consumes the inset viafitsSystemWindows, so the listener receives a zero bottom inset there and behavior is unchanged. The root ofactivity_newsreader.xmlintentionally 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