summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-10-08 13:21:18 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-08 13:21:19 -0700
commitdad6ca7b1417984c579eadc50f3a1d9a948042fe (patch)
tree425009ce6fb23188cf590a30e79c837a5b9cdf7f
parente330432779401d0e590b2ffd3547b2d45974e640 (diff)
parent244ebcd7b41fea9edbbbd12525973b1c6d6bcfe1 (diff)
downloadandroid_packages_apps_Trebuchet-dad6ca7b1417984c579eadc50f3a1d9a948042fe.tar.gz
android_packages_apps_Trebuchet-dad6ca7b1417984c579eadc50f3a1d9a948042fe.tar.bz2
android_packages_apps_Trebuchet-dad6ca7b1417984c579eadc50f3a1d9a948042fe.zip
Merge "Bug 7301303: more rows in all apps for sw720dp-port" into jb-mr1-dev
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index b71726165..5580381ca 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -449,8 +449,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
if (mMaxAppCellCountX > -1) {
maxCellCountX = Math.min(maxCellCountX, mMaxAppCellCountX);
}
+ // Temp hack for now: only use the max cell count Y for widget layout
+ int maxWidgetCellCountY = maxCellCountY;
if (mMaxAppCellCountY > -1) {
- maxCellCountY = Math.min(maxCellCountY, mMaxAppCellCountY);
+ maxWidgetCellCountY = Math.min(maxWidgetCellCountY, mMaxAppCellCountY);
}
// Now that the data is ready, we can calculate the content width, the number of cells to
@@ -466,6 +468,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// Force a measure to update recalculate the gaps
int widthSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST);
int heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST);
+ mWidgetSpacingLayout.calculateCellCount(width, height, maxCellCountX, maxWidgetCellCountY);
mWidgetSpacingLayout.measure(widthSpec, heightSpec);
mContentWidth = mWidgetSpacingLayout.getContentWidth();