commit | 641e288cc2bc0a55729223f0bc9a8a2642c4dbde | [log] [tgz] |
---|---|---|
author | Fabian Kozynski <kozynski@google.com> | Fri Jul 02 12:45:09 2021 -0400 |
committer | Fabian Kozynski <kozynski@google.com> | Fri Jul 02 12:45:09 2021 -0400 |
tree | 93aa22c9813d68981906c066e06f0309cd77b98c | |
parent | 6b9f1a5e2a60d334cad0ea9b280d556602ccf19a [diff] |
Remove last row bottom padding in QS The last row in QS should not have padding, as its followed by the pagination row of the footer that has some padding (but the last one in QQS should). Bug: 189982925 Test: manual Change-Id: I7b87539a14b9c6c4132cf9d8fee48e9bcc49a7e7
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java index 68962b0..4cd4048 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
@@ -180,6 +180,7 @@ LayoutParams.WRAP_CONTENT); setLayoutParams(lp); setMaxColumns(4); + mLastRowPadding = true; } @Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java index 3e558a9..2b96a34 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
@@ -31,6 +31,7 @@ protected int mCellMarginVertical; protected int mSidePadding; protected int mRows = 1; + protected boolean mLastRowPadding = false; protected final ArrayList<TileRecord> mRecords = new ArrayList<>(); protected boolean mListening; @@ -167,6 +168,10 @@ } int height = (mCellHeight + mCellMarginVertical) * mRows; + if (!mLastRowPadding) { + height -= mCellMarginVertical; + } + if (height < 0) height = 0; setMeasuredDimension(width, height);