diff options
author | Nilesh Agrawal <nileshagrawal@google.com> | 2014-01-03 22:28:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-01-03 22:28:44 +0000 |
commit | 579c8433f968fd8235527865797f8d58c20487da (patch) | |
tree | 68bf3e25039addef1f016413508bc10f3bf5d509 /src | |
parent | 8d36ffe55285fce9f0485d72a0b3f5dc73b9f5e2 (diff) | |
parent | 5f7099af8573c2229427318acd551b92efae02a3 (diff) | |
download | android_packages_apps_Trebuchet-579c8433f968fd8235527865797f8d58c20487da.tar.gz android_packages_apps_Trebuchet-579c8433f968fd8235527865797f8d58c20487da.tar.bz2 android_packages_apps_Trebuchet-579c8433f968fd8235527865797f8d58c20487da.zip |
Merge "Allow scrolling folders in when all apps is disabled." into jb-ub-now-kermit
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/Folder.java | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index fa6ce9631..2436a51a3 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -199,7 +199,7 @@ public class CellLayout extends ViewGroup { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CellLayout, defStyle, 0); mCellWidth = mCellHeight = -1; - mFixedCellHeight = mFixedCellHeight = -1; + mFixedCellWidth = mFixedCellHeight = -1; mWidthGap = mOriginalWidthGap = 0; mHeightGap = mOriginalHeightGap = 0; mMaxGap = Integer.MAX_VALUE; diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index f292821f4..ca82bd1a7 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -145,8 +145,13 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList Resources res = getResources(); mMaxCountX = (int) grid.numColumns; - mMaxCountY = (int) grid.numRows; - mMaxNumItems = mMaxCountX * mMaxCountY; + // Allow scrolling folders when DISABLE_ALL_APPS is true. + if (AppsCustomizePagedView.DISABLE_ALL_APPS) { + mMaxCountY = mMaxNumItems = Integer.MAX_VALUE; + } else { + mMaxCountY = (int) grid.numRows; + mMaxNumItems = mMaxCountX * mMaxCountY; + } mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); @@ -1009,7 +1014,13 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList int contentAreaHeightSpec = MeasureSpec.makeMeasureSpec(getContentAreaHeight(), MeasureSpec.EXACTLY); - mContent.setFixedSize(getContentAreaWidth(), getContentAreaHeight()); + if (AppsCustomizePagedView.DISABLE_ALL_APPS) { + // Don't cap the height of the content to allow scrolling. + mContent.setFixedSize(getContentAreaWidth(), mContent.getDesiredHeight()); + } else { + mContent.setFixedSize(getContentAreaWidth(), getContentAreaHeight()); + } + mScrollView.measure(contentAreaWidthSpec, contentAreaHeightSpec); mFolderName.measure(contentAreaWidthSpec, MeasureSpec.makeMeasureSpec(mFolderNameHeight, MeasureSpec.EXACTLY)); |