mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Pulling out predictions into another row view.
Change-Id: Iba0d74457a1314cf0c00a88f9b07df049334e542
This commit is contained in:
@@ -127,6 +127,7 @@ public class DeviceProfile {
|
||||
int allAppsNumRows;
|
||||
int allAppsNumCols;
|
||||
int appsViewNumCols;
|
||||
int appsViewNumPredictiveCols;
|
||||
int searchBarSpaceWidthPx;
|
||||
int searchBarSpaceHeightPx;
|
||||
int pageIndicatorHeightPx;
|
||||
@@ -411,7 +412,7 @@ public class DeviceProfile {
|
||||
|
||||
// All Apps
|
||||
allAppsCellWidthPx = allAppsIconSizePx;
|
||||
allAppsCellHeightPx = allAppsIconSizePx + drawablePadding + iconTextSizePx;
|
||||
allAppsCellHeightPx = allAppsIconSizePx + drawablePadding + allAppsIconTextSizePx;
|
||||
int maxLongEdgeCellCount =
|
||||
res.getInteger(R.integer.config_dynamic_grid_max_long_edge_cell_count);
|
||||
int maxShortEdgeCellCount =
|
||||
@@ -440,10 +441,13 @@ public class DeviceProfile {
|
||||
int appsViewLeftMarginPx =
|
||||
res.getDimensionPixelSize(R.dimen.apps_grid_view_start_margin);
|
||||
int availableAppsWidthPx = (containerWidth > 0) ? containerWidth : availableWidthPx;
|
||||
int numCols = (availableAppsWidthPx - appsViewLeftMarginPx) /
|
||||
int numAppsCols = (availableAppsWidthPx - appsViewLeftMarginPx) /
|
||||
(allAppsCellWidthPx + 2 * allAppsCellPaddingPx);
|
||||
if (numCols != appsViewNumCols) {
|
||||
appsViewNumCols = numCols;
|
||||
int numPredictiveAppCols = isPhone() ? numColumns : numAppsCols;
|
||||
if ((numAppsCols != appsViewNumCols) ||
|
||||
(numPredictiveAppCols != appsViewNumPredictiveCols)) {
|
||||
appsViewNumCols = numAppsCols;
|
||||
appsViewNumPredictiveCols = numPredictiveAppCols;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user