diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2016-06-22 22:06:19 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-06-22 22:06:19 +0000 |
commit | a1082b72af5eb4ba53ac4355b885f1d003d9408f (patch) | |
tree | 925be8f25ffe044682a16f8a293b1249b5ae5f0f | |
parent | 028e953ff968ad3fb2735caa3a92a9efb0f9df2e (diff) | |
parent | aac20dba113d3c12a964357a56b0c2dfb9dcb0d7 (diff) | |
download | android_packages_apps_Trebuchet-a1082b72af5eb4ba53ac4355b885f1d003d9408f.tar.gz android_packages_apps_Trebuchet-a1082b72af5eb4ba53ac4355b885f1d003d9408f.tar.bz2 android_packages_apps_Trebuchet-a1082b72af5eb4ba53ac4355b885f1d003d9408f.zip |
Merge \"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.\" into ub-launcher3-calgary
am: aac20dba11
Change-Id: Ice1b720217ed92046dc881382540dc289c207339
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsContainerView.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index cd7d3e36f..d1da6d9c0 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -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; |