Skip to content

Commit d631b5c

Browse files
Chris CrumpSirRGB
authored andcommitted
Launcher3: Consider extra header content as visible elements
Invoking extra header content such as floating header (predictions view) causes the overview panel to show under recent task. The search bar doesn't show in this case since it expects to scrim based on all apps content. Since predictions appear in this area, set the search bar to show as well, otherwise we get empty space above the predictions view. Change-Id: I7eb68f4bc2efdc383f0ced5ff4a0ad13e9bed528 Signed-off-by: Pranav Vashi <[email protected]>
1 parent a01c617 commit d631b5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static android.view.View.MeasureSpec.makeMeasureSpec;
2121

2222
import static com.android.launcher3.LauncherState.ALL_APPS_HEADER;
23+
import static com.android.launcher3.LauncherState.ALL_APPS_HEADER_EXTRA;
2324
import static com.android.launcher3.Utilities.prefixTextWithIcon;
2425
import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR;
2526

@@ -233,6 +234,9 @@ public float getScrollRangeDelta(Rect insets) {
233234
@Override
234235
public void setContentVisibility(int visibleElements, PropertySetter setter,
235236
Interpolator interpolator) {
236-
setter.setViewAlpha(this, (visibleElements & ALL_APPS_HEADER) != 0 ? 1 : 0, interpolator);
237+
boolean hasAllAppsHeaderExtra = mAppsView != null
238+
&& mAppsView.getFloatingHeaderView().hasVisibleContent();
239+
int headerElement = hasAllAppsHeaderExtra ? ALL_APPS_HEADER_EXTRA : ALL_APPS_HEADER;
240+
setter.setViewAlpha(this, (visibleElements & headerElement) != 0 ? 1 : 0, interpolator);
237241
}
238242
}

0 commit comments

Comments
 (0)