mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Accoutning for the seam on createAreaForResize for cellX position
I fix the left side resize issues but that broke right side resizes because I wasn't accounting for the seam and the other functions don't need to because they don't receive x,y cell position but they receive pixel position which are already accounted for by simulateSeam. Fix: 270227019 Test: atest FoldableItemsIntegrity Test: atest ReorderWidgets Change-Id: Ida09629111ea6f78a089f19a14bd806bd10bbff8
This commit is contained in:
committed by
Sebastián Franco
parent
ee24d3f9f4
commit
ee1baba8f4
@@ -69,17 +69,14 @@ public class MultipageCellLayout extends CellLayout {
|
||||
@Override
|
||||
boolean createAreaForResize(int cellX, int cellY, int spanX, int spanY, View dragView,
|
||||
int[] direction, boolean commit) {
|
||||
// Add seam to x position
|
||||
if (cellX > mCountX / 2) {
|
||||
cellX++;
|
||||
}
|
||||
int finalCellX = cellX;
|
||||
return simulateSeam(
|
||||
() -> super.createAreaForResize(cellX, cellY, spanX, spanY, dragView, direction,
|
||||
commit));
|
||||
}
|
||||
|
||||
@Override
|
||||
void regionToCenterPoint(int cellX, int cellY, int spanX, int spanY, int[] result) {
|
||||
simulateSeam(() -> {
|
||||
super.regionToCenterPoint(cellX, cellY, spanX, spanY, result);
|
||||
return 0;
|
||||
});
|
||||
() -> super.createAreaForResize(finalCellX, cellY, spanX, spanY, dragView,
|
||||
direction, commit));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user