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

Commit 058f75fb authored by Edgar Wang's avatar Edgar Wang
Browse files

Fix CollapsingToolbarAppCompatActivity didn't apply Edge To Edge correctly

The collapsing toolbar will clip the content to its padding. In order to fix the issue, we need to set the clipToPadding and clipChildren to false.

Bug: 352238050
Change-Id: Ibde2e96493e4bf21faf15045f4d95a0f73bdccca
Test: manual
Flag: EXEMPT bugfix
parent de8a8831
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settingslib.collapsingtoolbar;

import android.os.Build;
import android.view.ViewGroup;

import androidx.activity.ComponentActivity;
import androidx.activity.EdgeToEdge;
@@ -53,6 +54,8 @@ public class EdgeToEdgeUtils {
                            .getInsets(WindowInsetsCompat.Type.statusBars()).top;
                    // Apply the insets paddings to the view.
                    v.setPadding(insets.left, statusBarHeight, insets.right, insets.bottom);
                    ((ViewGroup)v).setClipToPadding(false);
                    ((ViewGroup)v).setClipChildren(false);

                    // Return CONSUMED if you don't want the window insets to keep being
                    // passed down to descendant views.