mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Updating Clings. (5057945, 5056643)
Change-Id: Ifb2d37e92495aeddf9d4b3277eb8d2a846f4aa99
This commit is contained in:
@@ -352,6 +352,14 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
|
||||
return n;
|
||||
}
|
||||
|
||||
/** Returns an estimated center position of the cell at the specified index */
|
||||
public int[] estimateCellPosition(int x, int y) {
|
||||
return new int[] {
|
||||
mPaddingLeft + (x * mCellWidth) + (x * mWidthGap) + (mCellWidth / 2),
|
||||
mPaddingTop + (y * mCellHeight) + (y * mHeightGap) + (mCellHeight / 2)
|
||||
};
|
||||
}
|
||||
|
||||
public void calculateCellCount(int width, int height, int maxCellCountX, int maxCellCountY) {
|
||||
mCellCountX = Math.min(maxCellCountX, estimateCellHSpan(width));
|
||||
mCellCountY = Math.min(maxCellCountY, estimateCellVSpan(height));
|
||||
|
||||
Reference in New Issue
Block a user