Accounting for bottom margin in the search box in app-scroll range am: 0bf251b643

Change-Id: Icd2c57f7de9b46d7d4581bea94faf7d132217094
This commit is contained in:
Sunny Goyal 2017-07-17 19:55:26 +00:00
commit 6cd0e46a8e
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,6 @@
<resources> <resources>
<!-- All Apps --> <!-- All Apps -->
<dimen name="all_apps_button_scale_down">8dp</dimen> <dimen name="all_apps_button_scale_down">8dp</dimen>
<dimen name="all_apps_search_bar_height">54dp</dimen>
<dimen name="all_apps_empty_search_message_top_offset">64dp</dimen> <dimen name="all_apps_empty_search_message_top_offset">64dp</dimen>
<dimen name="all_apps_empty_search_bg_top_offset">180dp</dimen> <dimen name="all_apps_empty_search_bg_top_offset">180dp</dimen>

View File

@ -202,7 +202,8 @@ public class AppsSearchContainerLayout extends FrameLayout
if (!dp.isVerticalBarLayout()) { if (!dp.isVerticalBarLayout()) {
Rect insets = mLauncher.getDragLayer().getInsets(); Rect insets = mLauncher.getDragLayer().getInsets();
int hotseatBottom = bottom - dp.hotseatBarBottomPaddingPx - insets.bottom; int hotseatBottom = bottom - dp.hotseatBarBottomPaddingPx - insets.bottom;
int searchTopMargin = insets.top + (mMinHeight - mSearchBoxHeight); int searchTopMargin = insets.top + (mMinHeight - mSearchBoxHeight)
+ ((MarginLayoutParams) getLayoutParams()).bottomMargin;
listener.onScrollRangeChanged(hotseatBottom - searchTopMargin); listener.onScrollRangeChanged(hotseatBottom - searchTopMargin);
} else { } else {
listener.onScrollRangeChanged(bottom); listener.onScrollRangeChanged(bottom);