Loading packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +8 −8 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout { private int mMaxColumns = NO_MAX_COLUMNS; private int mMaxColumns = NO_MAX_COLUMNS; protected int mResourceColumns; protected int mResourceColumns; private float mSquishinessFraction = 1f; private float mSquishinessFraction = 1f; private int mLastTileBottom; protected int mLastTileBottom; public TileLayout(Context context) { public TileLayout(Context context) { this(context, null); this(context, null); Loading Loading @@ -243,14 +243,13 @@ public class TileLayout extends ViewGroup implements QSTileLayout { record.tileView.setLeftTopRightBottom(left, top, right, bottom); record.tileView.setLeftTopRightBottom(left, top, right, bottom); } } record.tileView.setPosition(i); record.tileView.setPosition(i); if (forLayout) { mLastTileBottom = record.tileView.getBottom(); // Set the bottom to the unoverriden squished bottom. This is to avoid fake bottoms that } else { // are only used for QQS -> QS expansion animations float scale = QSTileViewImplKt.constrainSquishiness(mSquishinessFraction); float scale = QSTileViewImplKt.constrainSquishiness(mSquishinessFraction); mLastTileBottom = top + (int) (record.tileView.getMeasuredHeight() * scale); mLastTileBottom = top + (int) (record.tileView.getMeasuredHeight() * scale); } } } } } @Override @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { protected void onLayout(boolean changed, int l, int t, int r, int b) { Loading @@ -258,7 +257,8 @@ public class TileLayout extends ViewGroup implements QSTileLayout { } } protected int getRowTop(int row) { protected int getRowTop(int row) { return (int) (row * (mCellHeight * mSquishinessFraction + mCellMarginVertical)); float scale = QSTileViewImplKt.constrainSquishiness(mSquishinessFraction); return (int) (row * (mCellHeight * scale + mCellMarginVertical)); } } protected int getColumnStart(int column) { protected int getColumnStart(int column) { Loading Loading
packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +8 −8 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout { private int mMaxColumns = NO_MAX_COLUMNS; private int mMaxColumns = NO_MAX_COLUMNS; protected int mResourceColumns; protected int mResourceColumns; private float mSquishinessFraction = 1f; private float mSquishinessFraction = 1f; private int mLastTileBottom; protected int mLastTileBottom; public TileLayout(Context context) { public TileLayout(Context context) { this(context, null); this(context, null); Loading Loading @@ -243,14 +243,13 @@ public class TileLayout extends ViewGroup implements QSTileLayout { record.tileView.setLeftTopRightBottom(left, top, right, bottom); record.tileView.setLeftTopRightBottom(left, top, right, bottom); } } record.tileView.setPosition(i); record.tileView.setPosition(i); if (forLayout) { mLastTileBottom = record.tileView.getBottom(); // Set the bottom to the unoverriden squished bottom. This is to avoid fake bottoms that } else { // are only used for QQS -> QS expansion animations float scale = QSTileViewImplKt.constrainSquishiness(mSquishinessFraction); float scale = QSTileViewImplKt.constrainSquishiness(mSquishinessFraction); mLastTileBottom = top + (int) (record.tileView.getMeasuredHeight() * scale); mLastTileBottom = top + (int) (record.tileView.getMeasuredHeight() * scale); } } } } } @Override @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { protected void onLayout(boolean changed, int l, int t, int r, int b) { Loading @@ -258,7 +257,8 @@ public class TileLayout extends ViewGroup implements QSTileLayout { } } protected int getRowTop(int row) { protected int getRowTop(int row) { return (int) (row * (mCellHeight * mSquishinessFraction + mCellMarginVertical)); float scale = QSTileViewImplKt.constrainSquishiness(mSquishinessFraction); return (int) (row * (mCellHeight * scale + mCellMarginVertical)); } } protected int getColumnStart(int column) { protected int getColumnStart(int column) { Loading