diff options
Diffstat (limited to 'src/com/android/launcher3/FolderPagedView.java')
-rw-r--r-- | src/com/android/launcher3/FolderPagedView.java | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/com/android/launcher3/FolderPagedView.java b/src/com/android/launcher3/FolderPagedView.java index f070a6bba..a6494d274 100644 --- a/src/com/android/launcher3/FolderPagedView.java +++ b/src/com/android/launcher3/FolderPagedView.java @@ -55,9 +55,6 @@ public class FolderPagedView extends PagedView { private static final int[] sTempPosArray = new int[2]; - // TODO: Remove this restriction - private static final int MAX_ITEMS_PER_PAGE = 4; - public final boolean rtlLayout; private final LayoutInflater mInflater; @@ -84,13 +81,8 @@ public class FolderPagedView extends PagedView { LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); - if (ALLOW_FOLDER_SCROLL) { - mMaxCountX = Math.min((int) grid.numColumns, MAX_ITEMS_PER_PAGE); - mMaxCountY = Math.min((int) grid.numRows, MAX_ITEMS_PER_PAGE); - } else { - mMaxCountX = (int) grid.numColumns; - mMaxCountY = (int) grid.numRows; - } + mMaxCountX = (int) grid.numFolderColumns; + mMaxCountY = (int) grid.numFolderRows; mMaxItemsPerPage = mMaxCountX * mMaxCountY; @@ -210,7 +202,7 @@ public class FolderPagedView extends PagedView { public View createNewView(ShortcutInfo item) { final BubbleTextView textView = (BubbleTextView) mInflater.inflate( R.layout.folder_application, null, false); - textView.applyFromShortcutInfo(item, mIconCache, false); + textView.applyFromShortcutInfo(item, mIconCache); textView.setOnClickListener(mFolder); textView.setOnLongClickListener(mFolder); textView.setOnFocusChangeListener(mFocusIndicatorView); @@ -505,6 +497,10 @@ public class FolderPagedView extends PagedView { } } + public int getAllocatedContentSize() { + return mAllocatedContentSize; + } + /** * Reorders the items such that the {@param empty} spot moves to {@param target} */ |