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
This commit is contained in:
Jon Miranda
2016-11-11 14:35:20 -08:00
parent 47a96054d9
commit 145435ef6e

View File

@@ -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);