diff options
Diffstat (limited to 'src/com/android/launcher2/PagedViewCellLayout.java')
-rw-r--r-- | src/com/android/launcher2/PagedViewCellLayout.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java index 655a395e4..1ba5c053b 100644 --- a/src/com/android/launcher2/PagedViewCellLayout.java +++ b/src/com/android/launcher2/PagedViewCellLayout.java @@ -259,8 +259,18 @@ public class PagedViewCellLayout extends ViewGroup implements Page { return getWidthBeforeFirstLayout() - (mCellWidth - Utilities.getIconContentSize()); } + int getContentHeight() { + if (mCellCountY > 0) { + return mCellCountY * mCellHeight + (mCellCountY - 1) * Math.max(0, mHeightGap); + } + return 0; + } + int getWidthBeforeFirstLayout() { - return mCellCountX * mCellWidth + (mCellCountX - 1) * mWidthGap; + if (mCellCountX > 0) { + return mCellCountX * mCellWidth + (mCellCountX - 1) * Math.max(0, mWidthGap); + } + return 0; } @Override |