mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Add margin to all apps recycler container view
b/29509347 > Last row inside recycler view was obstructed by nav bar making it difficult to interact with before. Change-Id: I90f0f402e14230a1757f208f9b92800f10cdb38c
This commit is contained in:
@@ -186,7 +186,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
mLayoutManager = mAdapter.getLayoutManager();
|
||||
mItemDecoration = mAdapter.getItemDecoration();
|
||||
DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && !grid.isLandscape) {
|
||||
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && !grid.isVerticalBarLayout()) {
|
||||
mRecyclerViewTopBottomPadding = 0;
|
||||
setPadding(0, 0, 0, 0);
|
||||
} else {
|
||||
@@ -461,18 +461,19 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
|
||||
DeviceProfile grid = mLauncher.getDeviceProfile();
|
||||
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
|
||||
if (!grid.isLandscape) {
|
||||
if (!grid.isVerticalBarLayout()) {
|
||||
MarginLayoutParams mlp = (MarginLayoutParams) mAppsRecyclerView.getLayoutParams();
|
||||
|
||||
int navBarHeight = mLauncher.getDragLayer().getInsets().top;
|
||||
int height = navBarHeight + grid.hotseatCellHeightPx;
|
||||
Rect insets = mLauncher.getDragLayer().getInsets();
|
||||
getContentView().setPadding(0,0,0, insets.bottom);
|
||||
int height = insets.top + grid.hotseatCellHeightPx;
|
||||
|
||||
mlp.topMargin = height;
|
||||
mAppsRecyclerView.setLayoutParams(mlp);
|
||||
|
||||
LinearLayout.LayoutParams llp =
|
||||
(LinearLayout.LayoutParams) mSearchInput.getLayoutParams();
|
||||
llp.topMargin = navBarHeight;
|
||||
llp.topMargin = insets.top;
|
||||
mSearchInput.setLayoutParams(llp);
|
||||
|
||||
lp.height = height;
|
||||
|
||||
Reference in New Issue
Block a user