diff options
author | Nilesh Agrawal <nileshagrawal@google.com> | 2014-01-02 15:54:57 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-06-06 22:54:23 -0700 |
commit | 7c22086d0aa91fe010b4a4f0c734ab88f2e7bfa9 (patch) | |
tree | 6f89f480871eec8be7563cd207e7883070101485 /src/com/android/launcher3 | |
parent | 527793e2ac77098fe7e008c307548da28f978a7a (diff) | |
download | android_packages_apps_Trebuchet-7c22086d0aa91fe010b4a4f0c734ab88f2e7bfa9.tar.gz android_packages_apps_Trebuchet-7c22086d0aa91fe010b4a4f0c734ab88f2e7bfa9.tar.bz2 android_packages_apps_Trebuchet-7c22086d0aa91fe010b4a4f0c734ab88f2e7bfa9.zip |
Allow scrolling folders in when all apps is disabled.
Allows for more items to be added into a folder.
Allows for scrolling by letting the content area inside the scroll view to be taller.
The height of content area was capped in https://googleplex-android-review.git.corp.google.com/#/c/387583/
Change-Id: I8d7950ac9c155e26c5a299c17ae6a2bbf829dce6
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/Folder.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index b67767cae..6193aed2b 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -146,8 +146,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); @@ -1026,7 +1031,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)); |