summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppsCustomizePagedView.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-08-12 16:19:28 -0700
committerWinson Chung <winsonc@google.com>2013-08-20 10:56:05 -0700
commit5f8afe6280eae34620067696173e71943e1a30a3 (patch)
treeeb0ebdf56f2ad0950894424a49de9d1e8dc832e0 /src/com/android/launcher3/AppsCustomizePagedView.java
parent8a6870101c3d99257fc050d11bb69f50f5240622 (diff)
downloadandroid_packages_apps_Trebuchet-5f8afe6280eae34620067696173e71943e1a30a3.tar.gz
android_packages_apps_Trebuchet-5f8afe6280eae34620067696173e71943e1a30a3.tar.bz2
android_packages_apps_Trebuchet-5f8afe6280eae34620067696173e71943e1a30a3.zip
Initial Changes for Dynamic Grid
Change-Id: I9e6f1e5167791cf8dc140778dfa447f86424e9bf
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizePagedView.java')
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index dafa9b490..245d7eaf9 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -360,12 +360,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
Configuration.ORIENTATION_LANDSCAPE;
int maxCellCountX = Integer.MAX_VALUE;
int maxCellCountY = Integer.MAX_VALUE;
- if (LauncherAppState.getInstance().isScreenLarge()) {
- maxCellCountX = (isLandscape ? LauncherModel.getCellCountX() :
- LauncherModel.getCellCountY());
- maxCellCountY = (isLandscape ? LauncherModel.getCellCountY() :
- LauncherModel.getCellCountX());
- }
if (mMaxAppCellCountX > -1) {
maxCellCountX = Math.min(maxCellCountX, mMaxAppCellCountX);
}
@@ -1162,7 +1156,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// Note: We force a measure here to get around the fact that when we do layout calculations
// immediately after syncing, we don't have a proper width.
- int widthSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST);
+ int workspaceWidth = mLauncher.getWorkspace().getMeasuredWidth();
+ int widthSpec = MeasureSpec.makeMeasureSpec(Math.min(getMeasuredWidth(), workspaceWidth),
+ MeasureSpec.AT_MOST);
int heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST);
layout.setMinimumWidth(getPageContentWidth());
layout.measure(widthSpec, heightSpec);