Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f90745b0 authored by 2bllw8's avatar 2bllw8
Browse files

Recorder: do not set top system inset to list padding

Change-Id: I2dbc3b594f93d461c6dbc73155f0a94668b316b3
parent abba63c7
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -52,10 +52,13 @@ public final class Utils {
    @SuppressWarnings("deprecation")
    public static void setVerticalInsets(View view) {
        ViewCompat.setOnApplyWindowInsetsListener(view, (v, insets) -> {
             Insets systemInsets = Build.VERSION.SDK_INT >= 31
                    ? insets.getInsets(WindowInsetsCompat.Type.systemBars())
                    : insets.getSystemWindowInsets();
            v.setPadding(v.getPaddingLeft(), systemInsets.top,
            Insets systemInsets;
            if (Build.VERSION.SDK_INT >= 31) {
                systemInsets =  insets.getInsets(WindowInsetsCompat.Type.systemBars());
            } else {
                systemInsets = insets.getSystemWindowInsets();
            }
            v.setPadding(v.getPaddingLeft(), v.getPaddingTop(),
                    v.getPaddingRight(), systemInsets.bottom);
            return insets;
        });