Fixing calculation of # of rows in All Apps

(issue was esp. apparently on 1024x768 devices)
This commit is contained in:
Michael Jurka
2011-06-02 17:43:52 -07:00
parent 32271c3d20
commit 25dfc08894
@@ -174,7 +174,9 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
availableHeight -= mPageLayoutPaddingTop + mPageLayoutPaddingBottom;
availableHeight -= cellHeight; // Assume at least one row
availableHeight -= screenHeight * 0.16f;
Resources r = getContext().getResources();
float scaleFactor = r.getInteger(R.integer.config_allAppsZoomScaleFactor) / 100f;
availableHeight -= screenHeight * scaleFactor;
if (availableHeight > 0) {
return Math.min(mMaxCellCountY,
1 + availableHeight / (cellHeight + mPageLayoutHeightGap));