summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-05-01 12:38:17 -0700
committerMichael Jurka <mikejurka@google.com>2012-05-01 12:38:17 -0700
commitdd13e3d0f9925b7bb80c37e21d039aab4fa7e7a1 (patch)
treed29901671c745f44046206637b8030004701dccd
parent60d85e3afc9d0e056f9a9153af5565cf74dca9ae (diff)
downloadpackages_apps_trebuchet-dd13e3d0f9925b7bb80c37e21d039aab4fa7e7a1.zip
packages_apps_trebuchet-dd13e3d0f9925b7bb80c37e21d039aab4fa7e7a1.tar.gz
packages_apps_trebuchet-dd13e3d0f9925b7bb80c37e21d039aab4fa7e7a1.tar.bz2
Use public API to get padding
-rw-r--r--src/com/android/launcher2/CellLayout.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 2772d5c..c2797be 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -976,8 +976,8 @@ public class CellLayout extends ViewGroup {
int numHeightGaps = mCountY - 1;
if (mOriginalWidthGap < 0 || mOriginalHeightGap < 0) {
- int hSpace = widthSpecSize - mPaddingLeft - mPaddingRight;
- int vSpace = heightSpecSize - mPaddingTop - mPaddingBottom;
+ int hSpace = widthSpecSize - getPaddingLeft() - getPaddingRight();
+ int vSpace = heightSpecSize - getPaddingTop() - getPaddingBottom();
int hFreeSpace = hSpace - (mCountX * mCellWidth);
int vFreeSpace = vSpace - (mCountY * mCellHeight);
mWidthGap = Math.min(mMaxGap, numWidthGaps > 0 ? (hFreeSpace / numWidthGaps) : 0);