summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2016-11-11 14:35:20 -0800
committerJon Miranda <jonmiranda@google.com>2016-11-11 14:35:20 -0800
commit145435ef6e9e1146d5c5f8f2abef0356d638bce9 (patch)
tree1f9619eff76890e3f5fab0a34d03cf79eb2fe742 /src/com/android/launcher3
parent47a96054d97c042bd97b61795accbb9a59fd8ad0 (diff)
downloadandroid_packages_apps_Trebuchet-145435ef6e9e1146d5c5f8f2abef0356d638bce9.tar.gz
android_packages_apps_Trebuchet-145435ef6e9e1146d5c5f8f2abef0356d638bce9.tar.bz2
android_packages_apps_Trebuchet-145435ef6e9e1146d5c5f8f2abef0356d638bce9.zip
Using dimension defined for all apps search bar height.
In portrait multi-window mode, hotseat cell height is too small. Found that there was already a resource for all_apps_search_bar_height so using that instead. Change-Id: I56647eb55a7808e93bdcbb3334b1513f6ac23d7c
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsContainerView.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index c65a803c2..e468d8d60 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -75,6 +75,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
private AllAppsSearchBarController mSearchBarController;
private View mSearchContainer;
+ private int mSearchContainerMinHeight;
private ExtendedEditText mSearchInput;
private HeaderElevationController mElevationController;
@@ -100,6 +101,9 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
mApps.setAdapter(mAdapter);
mLayoutManager = mAdapter.getLayoutManager();
mSearchQueryBuilder = new SpannableStringBuilder();
+ mSearchContainerMinHeight
+ = getResources().getDimensionPixelSize(R.dimen.all_apps_search_bar_height);
+
Selection.setSelection(mSearchQueryBuilder, 0);
}
@@ -315,8 +319,9 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
if (!grid.isVerticalBarLayout()) {
MarginLayoutParams searchContainerLp =
(MarginLayoutParams) mSearchContainer.getLayoutParams();
+
searchContainerLp.height = mLauncher.getDragLayer().getInsets().top
- + grid.hotseatCellHeightPx;
+ + mSearchContainerMinHeight;
mSearchContainer.setLayoutParams(searchContainerLp);
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);