diff options
author | Winson Chung <winsonc@google.com> | 2013-09-03 17:48:37 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-09-05 12:14:28 -0700 |
commit | c58497ee619416c4949b16eb43486c11618b69e5 (patch) | |
tree | b8bfd3ec331885a25f42c69fb41dbfd861a4763a /src/com/android/launcher3/PagedViewCellLayout.java | |
parent | 2d8de5845be5f49d3767b8354f0d5479a0715abe (diff) | |
download | android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.gz android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.bz2 android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.zip |
Initial changes to restore AllApps.
- Removes unused all apps code due to dynamic grid/spacing
- Attempts to use CellLayout instead of PagedViewCellLayout
Change-Id: I3c49bca9fc35dfeaf250591fd63bc7f36119968f
Diffstat (limited to 'src/com/android/launcher3/PagedViewCellLayout.java')
-rw-r--r-- | src/com/android/launcher3/PagedViewCellLayout.java | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/com/android/launcher3/PagedViewCellLayout.java b/src/com/android/launcher3/PagedViewCellLayout.java index 51699e9ac..75d3aeef8 100644 --- a/src/com/android/launcher3/PagedViewCellLayout.java +++ b/src/com/android/launcher3/PagedViewCellLayout.java @@ -42,7 +42,6 @@ public class PagedViewCellLayout extends ViewGroup implements Page { private int mOriginalHeightGap; private int mWidthGap; private int mHeightGap; - private int mMaxGap; protected PagedViewCellLayoutChildren mChildren; public PagedViewCellLayout(Context context) { @@ -67,7 +66,6 @@ public class PagedViewCellLayout extends ViewGroup implements Page { mCellCountX = (int) grid.numColumns; mCellCountY = (int) grid.numRows; mOriginalWidthGap = mOriginalHeightGap = mWidthGap = mHeightGap = -1; - mMaxGap = resources.getDimensionPixelSize(R.dimen.apps_customize_max_gap); mChildren = new PagedViewCellLayoutChildren(context); mChildren.setCellDimensions(mCellWidth, mCellHeight); @@ -184,8 +182,8 @@ public class PagedViewCellLayout extends ViewGroup implements Page { int vSpace = heightSpecSize - getPaddingTop() - getPaddingBottom(); int hFreeSpace = hSpace - (mCellCountX * mOriginalCellWidth); int vFreeSpace = vSpace - (mCellCountY * mOriginalCellHeight); - mWidthGap = Math.min(mMaxGap, numWidthGaps > 0 ? (hFreeSpace / numWidthGaps) : 0); - mHeightGap = Math.min(mMaxGap,numHeightGaps > 0 ? (vFreeSpace / numHeightGaps) : 0); + mWidthGap = numWidthGaps > 0 ? (hFreeSpace / numWidthGaps) : 0; + mHeightGap = numHeightGaps > 0 ? (vFreeSpace / numHeightGaps) : 0; mChildren.setGap(mWidthGap, mHeightGap); } else { @@ -493,12 +491,4 @@ public class PagedViewCellLayout extends ViewGroup implements Page { this.cellHSpan + ", " + this.cellVSpan + ")"; } } -} - -interface Page { - public int getPageChildCount(); - public View getChildOnPageAt(int i); - public void removeAllViewsOnPage(); - public void removeViewOnPageAt(int i); - public int indexOfChildOnPage(View v); -} +}
\ No newline at end of file |