Merge "Bug 7301303: more rows in all apps for sw720dp-port" into jb-mr1-dev
This commit is contained in:
commit
dad6ca7b14
1 file changed
+4
-1
@@ -449,8 +449,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
|||||||
if (mMaxAppCellCountX > -1) {
|
if (mMaxAppCellCountX > -1) {
|
||||||
maxCellCountX = Math.min(maxCellCountX, mMaxAppCellCountX);
|
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) {
|
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
|
// 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
|
// Force a measure to update recalculate the gaps
|
||||||
int widthSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST);
|
int widthSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST);
|
||||||
int heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST);
|
int heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST);
|
||||||
|
mWidgetSpacingLayout.calculateCellCount(width, height, maxCellCountX, maxWidgetCellCountY);
|
||||||
mWidgetSpacingLayout.measure(widthSpec, heightSpec);
|
mWidgetSpacingLayout.measure(widthSpec, heightSpec);
|
||||||
mContentWidth = mWidgetSpacingLayout.getContentWidth();
|
mContentWidth = mWidgetSpacingLayout.getContentWidth();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user