Merge "Fix unable to scroll to the bottom page" into tm-dev am: 88bff1ebc5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17033482

Change-Id: Ica14a430abc91aeaa2c2647d166beb3472eff07e
This commit is contained in:
Tsung-Mao Fang
2022-03-02 03:40:47 +00:00
committed by Automerger Merge Worker

View File

@@ -32,7 +32,6 @@ import android.util.ArraySet;
import android.util.FeatureFlagUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout;
@@ -236,12 +235,8 @@ public class SettingsHomepageActivity extends FragmentActivity implements
ViewCompat.setOnApplyWindowInsetsListener(findViewById(android.R.id.content),
(v, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
// Apply the insets as a margin to the view. Here the system is setting
// only the top dimensions.
ViewGroup.MarginLayoutParams mlp =
(ViewGroup.MarginLayoutParams) v.getLayoutParams();
mlp.topMargin = insets.top;
v.setLayoutParams(mlp);
// Apply the insets paddings to the view.
v.setPadding(insets.left, insets.top, insets.right, insets.bottom);
// Return CONSUMED if you don't want the window insets to keep being
// passed down to descendant views.