mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due to insets. This is necessary since there are now different layouts depending on which side the navigation bar is on - Consolidating hotseat and other layout into the device profile launcher layout logic - Making the all apps icons match the workspace icon height - Tweaking caret drawable to draw to the bounds specified to simplify layout in each orientation - Fixing minor issue with page indicator shifting in landscape - Centering overview buttons to the workspace page Bug: 30021487 Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
This commit is contained in:
@@ -347,12 +347,10 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
int widthPx = MeasureSpec.getSize(widthMeasureSpec);
|
||||
int heightPx = MeasureSpec.getSize(heightMeasureSpec);
|
||||
updatePaddingsAndMargins(widthPx, heightPx);
|
||||
mContentBounds.set(mHorizontalPadding, 0, widthPx - mHorizontalPadding, heightPx);
|
||||
mContentBounds.set(mContainerPaddingLeft, 0, widthPx - mContainerPaddingRight, heightPx);
|
||||
|
||||
DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
int availableWidth = (!mContentBounds.isEmpty() ? mContentBounds.width() : widthPx)
|
||||
- 2 * mAppsRecyclerView.getMaxScrollbarWidth();
|
||||
grid.updateAppsViewNumCols(getResources(), availableWidth);
|
||||
grid.updateAppsViewNumCols();
|
||||
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
|
||||
if (mNumAppsPerRow != grid.inv.numColumns ||
|
||||
mNumPredictedAppsPerRow != grid.inv.numColumns) {
|
||||
@@ -368,9 +366,9 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
getResources().getDimensionPixelSize(
|
||||
R.dimen.container_fastscroll_thumb_max_width);
|
||||
mSearchContainer.setPadding(
|
||||
rvPadding - mHorizontalPadding + thumbMaxWidth,
|
||||
rvPadding - mContainerPaddingLeft + thumbMaxWidth,
|
||||
mSearchContainer.getPaddingTop(),
|
||||
rvPadding - mHorizontalPadding + thumbMaxWidth,
|
||||
rvPadding - mContainerPaddingRight + thumbMaxWidth,
|
||||
mSearchContainer.getPaddingBottom());
|
||||
}
|
||||
}
|
||||
@@ -383,7 +381,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
// Update the number of items in the grid before we measure the view
|
||||
// TODO: mSectionNamesMargin is currently 0, but also account for it,
|
||||
// if it's enabled in the future.
|
||||
grid.updateAppsViewNumCols(getResources(), availableWidth);
|
||||
grid.updateAppsViewNumCols();
|
||||
if (mNumAppsPerRow != grid.allAppsNumCols ||
|
||||
mNumPredictedAppsPerRow != grid.allAppsNumPredictiveCols) {
|
||||
mNumAppsPerRow = grid.allAppsNumCols;
|
||||
|
||||
Reference in New Issue
Block a user