Tweak search bar style to follow Launcher3

This commit is contained in:
SuperDragonXD
2024-04-29 08:39:44 +08:00
parent 7c34d0c160
commit 9243b8ca56
4 changed files with 27 additions and 8 deletions

View File

@@ -777,14 +777,13 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
return;
}
float prog = Utilities.boundToRange((float) scrolledOffset / mHeaderThreshold, 0f, 1f);
boolean bgVisible = mSearchUiManager.getBackgroundVisibility();
if (scrolledOffset == 0 && !isSearching()) {
if (!isSearching()) {
bgVisible = true;
} else if (scrolledOffset > mHeaderThreshold) {
} else {
bgVisible = false;
}
mSearchUiManager.setBackgroundVisibility(bgVisible, 1 - prog);
mSearchUiManager.setBackgroundVisibility(bgVisible, 1);
}
protected int getHeaderColor(float blendRatio) {