File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -580,11 +580,17 @@ public void onChange(final boolean selfChange) {
580580 v .getPaddingTop (),
581581 v .getPaddingRight (),
582582 v .getPaddingBottom ());
583- binding .fastSeekOverlay .setPadding (
584- v .getPaddingLeft (),
585- v .getPaddingTop (),
586- v .getPaddingRight (),
587- v .getPaddingBottom ());
583+
584+ // If we added padding to the fast seek overlay, too, it would not go under the
585+ // system ui. Instead we apply negative margins equal to the window insets of
586+ // the opposite side, so that the view covers all of the player (overflowing on
587+ // some sides) and its center coincides with the center of other controls.
588+ final RelativeLayout .LayoutParams fastSeekParams = (RelativeLayout .LayoutParams )
589+ binding .fastSeekOverlay .getLayoutParams ();
590+ fastSeekParams .leftMargin = -v .getPaddingRight ();
591+ fastSeekParams .topMargin = -v .getPaddingBottom ();
592+ fastSeekParams .rightMargin = -v .getPaddingLeft ();
593+ fastSeekParams .bottomMargin = -v .getPaddingTop ();
588594 });
589595 }
590596
You can’t perform that action at this time.
0 commit comments