Hide searchbox when header protection is on.

Bug: 191726215
Test: manual
Change-Id: I086a05654faf718683ebe5dfbcf64b6bd6347ca8
This commit is contained in:
Hyunyoung Song
2021-06-16 10:35:14 -07:00
parent deeab12791
commit 7d3b25734a
4 changed files with 20 additions and 0 deletions

View File

@@ -717,6 +717,10 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
: mSearchContainer.getBottom();
canvas.drawRect(0, 0, getWidth(), bottom + getTranslationY(),
mHeaderPaint);
if (FeatureFlags.ENABLE_DEVICE_SEARCH.get() && getTranslationY() == 0) {
mSearchUiManager.getEditText().setBackground(null);
}
}
}
@@ -805,6 +809,9 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
getSearchView().setBackgroundColor(viewBG);
getFloatingHeaderView().setHeaderColor(viewBG);
invalidateHeader();
if (scrolledOffset == 0 && mSearchUiManager.getEditText() != null) {
mSearchUiManager.getEditText().show();
}
}
}