Setting content bounds in onMeasure as it uses measuredWidth, which might

not be available during onCreate

Also fixing the calculation of allApps column could, which was counting an
additional icon gap

Bug: 27173894
Change-Id: I8be8cccc76d7e7d945cf9383567a3026228b6c86
This commit is contained in:
Sunny Goyal committed 2016-02-16 15:24:14 -08:00
1 parent 187b8f547d
commit 94f46d9e5f
3 files changed
+9 -7

No files matched your search

+1 -1
View File
@@ -270,7 +270,7 @@ public class DeviceProfile {
int allAppsCellWidthGap =
res.getDimensionPixelSize(R.dimen.all_apps_icon_width_gap);
int availableAppsWidthPx = (recyclerViewWidth > 0) ? recyclerViewWidth : availableWidthPx;
int numAppsCols = (availableAppsWidthPx - appsViewLeftMarginPx) /
int numAppsCols = (availableAppsWidthPx + allAppsCellWidthGap - appsViewLeftMarginPx) /
(allAppsIconSizePx + allAppsCellWidthGap);
int numPredictiveAppCols = Math.max(inv.minAllAppsPredictionColumns, numAppsCols);
allAppsNumCols = numAppsCols;