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
This commit is contained in:
Fabian Kozynski
2021-07-02 12:45:09 -04:00
parent 6b9f1a5e2a
commit 641e288cc2
2 changed files with 6 additions and 0 deletions

View File

@@ -180,6 +180,7 @@ public class QuickQSPanel extends QSPanel {
LayoutParams.WRAP_CONTENT);
setLayoutParams(lp);
setMaxColumns(4);
mLastRowPadding = true;
}
@Override

View File

@@ -31,6 +31,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout {
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 @@ public class TileLayout extends ViewGroup implements QSTileLayout {
}
int height = (mCellHeight + mCellMarginVertical) * mRows;
if (!mLastRowPadding) {
height -= mCellMarginVertical;
}
if (height < 0) height = 0;
setMeasuredDimension(width, height);