Merge "Fix unable to scroll to the bottom page" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
88bff1ebc5
@@ -32,7 +32,6 @@ import android.util.ArraySet;
|
|||||||
import android.util.FeatureFlagUtils;
|
import android.util.FeatureFlagUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
@@ -236,12 +235,8 @@ public class SettingsHomepageActivity extends FragmentActivity implements
|
|||||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(android.R.id.content),
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(android.R.id.content),
|
||||||
(v, windowInsets) -> {
|
(v, windowInsets) -> {
|
||||||
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
// Apply the insets as a margin to the view. Here the system is setting
|
// Apply the insets paddings to the view.
|
||||||
// only the top dimensions.
|
v.setPadding(insets.left, insets.top, insets.right, insets.bottom);
|
||||||
ViewGroup.MarginLayoutParams mlp =
|
|
||||||
(ViewGroup.MarginLayoutParams) v.getLayoutParams();
|
|
||||||
mlp.topMargin = insets.top;
|
|
||||||
v.setLayoutParams(mlp);
|
|
||||||
|
|
||||||
// Return CONSUMED if you don't want the window insets to keep being
|
// Return CONSUMED if you don't want the window insets to keep being
|
||||||
// passed down to descendant views.
|
// passed down to descendant views.
|
||||||
|
Reference in New Issue
Block a user