mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Fixing test that fail when FOLDABLE_SINGLE_PAGE is set to true
We need to change the result of REQUEST_IS_TWO_PANELS when the flag is on because now we don't have two panels only 1. Another of the issues is a rounding error when calling getUnusedHorizontalSpace(). And lastly updating workspaceToBoards so that it maps the coordinate of workspace items to their right position. Bug: 270395274 Test: atest ReorderWidgets Change-Id: I2620e5bf1ba132f984e00d2a6c21081953d259fd
This commit is contained in:
committed by
Sebastián Franco
parent
c86678ef41
commit
25423867af
@@ -94,6 +94,13 @@ public class MultipageCellLayout extends CellLayout {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUnusedHorizontalSpace() {
|
||||
return (int) Math.ceil(
|
||||
(getMeasuredWidth() - getPaddingLeft() - getPaddingRight() - (mCountX * mCellWidth)
|
||||
- ((mCountX - 1) * mBorderSpace.x)) / 2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
if (mLeftBackground.getAlpha() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user