summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/PagedViewCellLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/PagedViewCellLayout.java')
-rw-r--r--src/com/android/launcher2/PagedViewCellLayout.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index 196063d29..40be03d49 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -267,8 +267,12 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
}
}
+ int getContentHeight() {
+ return mCellCountY * mCellHeight + (mCellCountY - 1) * Math.max(0, mHeightGap);
+ }
+
int getWidthBeforeFirstLayout() {
- return mCellCountX * mCellWidth + (mCellCountX - 1) * mWidthGap;
+ return mCellCountX * mCellWidth + (mCellCountX - 1) * Math.max(0, mWidthGap);
}
@Override