Merge pull request #7898 from Stypox/regression-arc

Have fast seek overlay arc go under system ui
pull/7931/head
litetex 2022-02-21 20:19:22 +01:00 zatwierdzone przez GitHub
commit de08edb831
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 11 dodań i 5 usunięć

Wyświetl plik

@ -580,11 +580,17 @@ public final class Player implements
v.getPaddingTop(),
v.getPaddingRight(),
v.getPaddingBottom());
binding.fastSeekOverlay.setPadding(
v.getPaddingLeft(),
v.getPaddingTop(),
v.getPaddingRight(),
v.getPaddingBottom());
// If we added padding to the fast seek overlay, too, it would not go under the
// system ui. Instead we apply negative margins equal to the window insets of
// the opposite side, so that the view covers all of the player (overflowing on
// some sides) and its center coincides with the center of other controls.
final RelativeLayout.LayoutParams fastSeekParams = (RelativeLayout.LayoutParams)
binding.fastSeekOverlay.getLayoutParams();
fastSeekParams.leftMargin = -v.getPaddingRight();
fastSeekParams.topMargin = -v.getPaddingBottom();
fastSeekParams.rightMargin = -v.getPaddingLeft();
fastSeekParams.bottomMargin = -v.getPaddingTop();
});
}