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

Commit e8e4a4da authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Automerger Merge Worker
Browse files

Merge "Remove last row bottom padding in QS" into sc-dev am: 49ed060f am: 2a40819b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15188484

Change-Id: I944abf2f5c60af2f8e2aeed0a1961ac313ee9ccc
parents 92420b99 2a40819b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ public class QuickQSPanel extends QSPanel {
                    LayoutParams.WRAP_CONTENT);
            setLayoutParams(lp);
            setMaxColumns(4);
            mLastRowPadding = true;
        }

        @Override
+5 −0
Original line number Diff line number Diff line
@@ -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);