mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Ensuring that we use the screen width more optimally in AllApps.
- Fixing issue with prediction bar height being calculated incorrectly - Fixing issue where the prediction bar divider was not drawn exactly between the bar and the first row of apps - Removing padding to allow scrollbars to reach full height Bug: 20222023 Bug: 21335377 Change-Id: I2c0614a36e2294d0d6184a6bff4847876ffe971e
This commit is contained in:
@@ -230,12 +230,12 @@ public class DeviceProfile {
|
||||
public boolean updateAppsViewNumCols(Resources res, int containerWidth) {
|
||||
int appsViewLeftMarginPx =
|
||||
res.getDimensionPixelSize(R.dimen.all_apps_grid_view_start_margin);
|
||||
int allAppsCellPaddingPx =
|
||||
res.getDimensionPixelSize(R.dimen.all_apps_icon_left_right_padding);
|
||||
int allAppsCellWidthGap =
|
||||
res.getDimensionPixelSize(R.dimen.all_apps_icon_width_gap);
|
||||
int availableAppsWidthPx = (containerWidth > 0) ? containerWidth : availableWidthPx;
|
||||
int numAppsCols = (availableAppsWidthPx - appsViewLeftMarginPx) /
|
||||
(allAppsIconSizePx + 2 * allAppsCellPaddingPx);
|
||||
int numPredictiveAppCols = isPhone ? 4 : numAppsCols;
|
||||
(allAppsIconSizePx + allAppsCellWidthGap);
|
||||
int numPredictiveAppCols = Math.max(inv.minAllAppsPredictionColumns, numAppsCols);
|
||||
if ((numAppsCols != allAppsNumCols) ||
|
||||
(numPredictiveAppCols != allAppsNumPredictiveCols)) {
|
||||
allAppsNumCols = numAppsCols;
|
||||
|
||||
Reference in New Issue
Block a user