Removing separate hotseat widget, instead using a QSB acroll all UI.

The QSB is responsible for updating its UI according to various states.

Bug: 109828640
Change-Id: Ic8cbf3d404d5870de0f6b8fe25a332b8d21bae20
This commit is contained in:
Sunny Goyal 2018-11-02 13:50:40 -07:00
parent 08584e18d6
commit 876e462ffa
12 changed files with 90 additions and 175 deletions

View File

@ -26,7 +26,9 @@
android:focusable="false"
android:saveEnabled="false" >
<include layout="@layout/all_apps_rv_layout" />
<include
layout="@layout/all_apps_rv_layout"
android:visibility="gone" />
<include layout="@layout/all_apps_floating_header" />

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.launcher3.Hotseat
android:theme="@style/HomeScreenElementTheme"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto">
<com.android.launcher3.CellLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
launcher:containerType="hotseat"
android:importantForAccessibility="no" />
</com.android.launcher3.Hotseat>

View File

@ -56,22 +56,25 @@
android:id="@+id/drop_target_bar"
layout="@layout/drop_target_bar" />
<include android:id="@+id/scrim_view"
<include
android:id="@+id/scrim_view"
layout="@layout/scrim_view" />
<include
android:id="@+id/apps_view"
layout="@layout/all_apps"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible" />
android:layout_height="match_parent" />
<!-- DO NOT CHANGE THE ID -->
<include
<com.android.launcher3.Hotseat
android:id="@+id/hotseat"
layout="@layout/hotseat"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:theme="@style/HomeScreenElementTheme"
android:importantForAccessibility="no"
launcher:containerType="hotseat" />
</com.android.launcher3.dragndrop.DragLayer>
</com.android.launcher3.LauncherRootView>

View File

@ -131,7 +131,6 @@
<!-- QSB IDs. DO not change -->
<item type="id" name="search_container_workspace" />
<item type="id" name="search_container_hotseat" />
<item type="id" name="search_container_all_apps" />
<!-- Recents -->

View File

@ -27,13 +27,12 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.android.launcher3.logging.StatsLogUtils.LogContainerProvider;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
public class Hotseat extends FrameLayout implements LogContainerProvider, Insettable {
public class Hotseat extends CellLayout implements LogContainerProvider, Insettable {
private final Launcher mLauncher;
private CellLayout mContent;
@ViewDebug.ExportedProperty(category = "launcher")
private boolean mHasVerticalHotseat;
@ -51,38 +50,23 @@ public class Hotseat extends FrameLayout implements LogContainerProvider, Insett
mLauncher = Launcher.getLauncher(context);
}
public CellLayout getLayout() {
return mContent;
}
/* Get the orientation invariant order of the item in the hotseat for persistence. */
int getOrderInHotseat(int x, int y) {
return mHasVerticalHotseat ? (mContent.getCountY() - y - 1) : x;
}
/* Get the orientation specific coordinates given an invariant order in the hotseat. */
int getCellXFromOrder(int rank) {
return mHasVerticalHotseat ? 0 : rank;
}
int getCellYFromOrder(int rank) {
return mHasVerticalHotseat ? (mContent.getCountY() - (rank + 1)) : 0;
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mContent = findViewById(R.id.layout);
return mHasVerticalHotseat ? (getCountY() - (rank + 1)) : 0;
}
void resetLayout(boolean hasVerticalHotseat) {
mContent.removeAllViewsInLayout();
removeAllViewsInLayout();
mHasVerticalHotseat = hasVerticalHotseat;
InvariantDeviceProfile idp = mLauncher.getDeviceProfile().inv;
if (hasVerticalHotseat) {
mContent.setGridSize(1, idp.numHotseatIcons);
setGridSize(1, idp.numHotseatIcons);
} else {
mContent.setGridSize(idp.numHotseatIcons, 1);
setGridSize(idp.numHotseatIcons, 1);
}
}
@ -90,15 +74,16 @@ public class Hotseat extends FrameLayout implements LogContainerProvider, Insett
public boolean onInterceptTouchEvent(MotionEvent ev) {
// We don't want any clicks to go through to the hotseat unless the workspace is in
// the normal state or an accessible drag is in progress.
return !mLauncher.getWorkspace().workspaceIconsCanBeDragged() &&
!mLauncher.getAccessibilityDelegate().isInAccessibleDrag();
return (!mLauncher.getWorkspace().workspaceIconsCanBeDragged()
&& !mLauncher.getAccessibilityDelegate().isInAccessibleDrag())
|| super.onInterceptTouchEvent(ev);
}
@Override
public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {
target.gridX = info.cellX;
target.gridY = info.cellY;
targetParent.containerType = ContainerType.HOTSEAT;
targetParent.containerType = LauncherLogProto.ContainerType.HOTSEAT;
}
@Override
@ -121,7 +106,7 @@ public class Hotseat extends FrameLayout implements LogContainerProvider, Insett
lp.height = grid.hotseatBarSizePx + insets.bottom;
}
Rect padding = grid.getHotseatLayoutPadding();
getLayout().setPadding(padding.left, padding.top, padding.right, padding.bottom);
setPadding(padding.left, padding.top, padding.right, padding.bottom);
setLayoutParams(lp);
InsettableFrameLayout.dispatchInsets(this, insets);

View File

@ -207,7 +207,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
private final int[] mTmpAddItemCellCoordinates = new int[2];
@Thunk Hotseat mHotseat;
@Nullable private View mHotseatSearchBox;
private DropTargetBar mDropTargetBar;
@ -914,7 +913,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
mWorkspace.initParentViews(mDragLayer);
mOverviewPanel = findViewById(R.id.overview_panel);
mHotseat = findViewById(R.id.hotseat);
mHotseatSearchBox = findViewById(R.id.search_container_hotseat);
mLauncherView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
@ -1159,10 +1157,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
return mHotseat;
}
public View getHotseatSearchBox() {
return mHotseatSearchBox;
}
public <T extends View> T getOverviewPanel() {
return (T) mOverviewPanel;
}
@ -1654,23 +1648,15 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
boolean isHotseatLayout(View layout) {
// TODO: Remove this method
return mHotseat != null && layout != null &&
(layout instanceof CellLayout) && (layout == mHotseat.getLayout());
return mHotseat != null && (layout == mHotseat);
}
/**
* Returns the CellLayout of the specified container at the specified screen.
*/
public CellLayout getCellLayout(int container, int screenId) {
if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
if (mHotseat != null) {
return mHotseat.getLayout();
} else {
return null;
}
} else {
return mWorkspace.getScreenWithId(screenId);
}
return (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT)
? mHotseat : mWorkspace.getScreenWithId(screenId);
}
@Override
@ -2281,7 +2267,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
}
writer.println(prefix + " Hotseat");
ViewGroup layout = mHotseat.getLayout().getShortcutsAndWidgets();
ViewGroup layout = mHotseat.getShortcutsAndWidgets();
for (int j = 0; j < layout.getChildCount(); j++) {
Object tag = layout.getChildAt(j).getTag();
if (tag != null) {

View File

@ -85,8 +85,8 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.IntArray;
import com.android.launcher3.util.IntSparseArrayMap;
import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.IntSparseArrayMap;
import com.android.launcher3.util.ItemInfoMatcher;
import com.android.launcher3.util.PackageUserKey;
import com.android.launcher3.util.Thunk;
@ -880,7 +880,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
final CellLayout layout;
if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
layout = mLauncher.getHotseat().getLayout();
layout = mLauncher.getHotseat();
// Hide folder title in the hotseat
if (child instanceof FolderIcon) {
@ -1517,7 +1517,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
@Override
protected void enableAccessibleDrag(boolean enable) {
super.enableAccessibleDrag(enable);
setEnableForLayout(mLauncher.getHotseat().getLayout(),enable);
setEnableForLayout(mLauncher.getHotseat(),enable);
}
});
}
@ -1625,11 +1625,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
mDragViewVisualCenter = d.getVisualCenter(mDragViewVisualCenter);
// We want the point to be mapped to the dragTarget.
if (mLauncher.isHotseatLayout(dropTargetLayout)) {
mapPointFromSelfToHotseatLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
} else {
mapPointFromSelfToChild(dropTargetLayout, mDragViewVisualCenter);
}
mapPointFromDropLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
int spanX;
int spanY;
@ -1831,11 +1827,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
// We want the point to be mapped to the dragTarget.
if (dropTargetLayout != null) {
if (mLauncher.isHotseatLayout(dropTargetLayout)) {
mapPointFromSelfToHotseatLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
} else {
mapPointFromSelfToChild(dropTargetLayout, mDragViewVisualCenter);
}
mapPointFromDropLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
}
boolean droppedOnOriginalCell = false;
@ -2195,7 +2187,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
* Convert the 2D coordinate xy from the parent View's coordinate space to this CellLayout's
* coordinate space. The argument xy is modified with the return result.
*/
void mapPointFromSelfToChild(View v, float[] xy) {
private void mapPointFromSelfToChild(View v, float[] xy) {
xy[0] = xy[0] - v.getLeft();
xy[1] = xy[1] - v.getTop();
}
@ -2211,14 +2203,23 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
mTempXY[1] <= hotseat.getBottom();
}
void mapPointFromSelfToHotseatLayout(Hotseat hotseat, float[] xy) {
mTempXY[0] = (int) xy[0];
mTempXY[1] = (int) xy[1];
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, mTempXY, true);
mLauncher.getDragLayer().mapCoordInSelfToDescendant(hotseat.getLayout(), mTempXY);
/**
* Updates the point in {@param xy} to point to the co-ordinate space of {@param layout}
* @param layout either hotseat of a page in workspace
* @param xy the point location in workspace co-ordinate space
*/
private void mapPointFromDropLayout(CellLayout layout, float[] xy) {
if (mLauncher.isHotseatLayout(layout)) {
mTempXY[0] = (int) xy[0];
mTempXY[1] = (int) xy[1];
mLauncher.getDragLayer().getDescendantCoordRelativeToSelf(this, mTempXY, true);
mLauncher.getDragLayer().mapCoordInSelfToDescendant(layout, mTempXY);
xy[0] = mTempXY[0];
xy[1] = mTempXY[1];
xy[0] = mTempXY[0];
xy[1] = mTempXY[1];
} else {
mapPointFromSelfToChild(layout, xy);
}
}
private boolean isDragWidget(DragObject d) {
@ -2254,11 +2255,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
// Handle the drag over
if (mDragTargetLayout != null) {
// We want the point to be mapped to the dragTarget.
if (mLauncher.isHotseatLayout(mDragTargetLayout)) {
mapPointFromSelfToHotseatLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
} else {
mapPointFromSelfToChild(mDragTargetLayout, mDragViewVisualCenter);
}
mapPointFromDropLayout(mLauncher.getHotseat(), mDragViewVisualCenter);
int minSpanX = item.spanX;
int minSpanY = item.spanY;
@ -2329,7 +2326,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
// Test to see if we are over the hotseat first
if (mLauncher.getHotseat() != null && !isDragWidget(d)) {
if (isPointInSelfOverHotseat(d.x, d.y)) {
layout = mLauncher.getHotseat().getLayout();
layout = mLauncher.getHotseat();
}
}
@ -2967,8 +2964,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
* Returns a specific CellLayout
*/
CellLayout getParentCellLayoutForView(View v) {
ArrayList<CellLayout> layouts = getWorkspaceAndHotseatCellLayouts();
for (CellLayout layout : layouts) {
for (CellLayout layout : getWorkspaceAndHotseatCellLayouts()) {
if (layout.getShortcutsAndWidgets().indexOfChild(v) > -1) {
return layout;
}
@ -2977,56 +2973,31 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
}
/**
* Returns a list of all the CellLayouts in the workspace.
* Returns a list of all the CellLayouts on the Homescreen.
*/
ArrayList<CellLayout> getWorkspaceAndHotseatCellLayouts() {
ArrayList<CellLayout> layouts = new ArrayList<>();
private CellLayout[] getWorkspaceAndHotseatCellLayouts() {
int screenCount = getChildCount();
for (int screen = 0; screen < screenCount; screen++) {
layouts.add(((CellLayout) getChildAt(screen)));
}
final CellLayout[] layouts;
if (mLauncher.getHotseat() != null) {
layouts.add(mLauncher.getHotseat().getLayout());
layouts = new CellLayout[screenCount + 1];
layouts[screenCount] = mLauncher.getHotseat();
} else {
layouts = new CellLayout[screenCount];
}
for (int screen = 0; screen < screenCount; screen++) {
layouts[screen] = (CellLayout) getChildAt(screen);
}
return layouts;
}
/**
* We should only use this to search for specific children. Do not use this method to modify
* ShortcutsAndWidgetsContainer directly. Includes ShortcutAndWidgetContainers from
* the hotseat and workspace pages
*/
ArrayList<ShortcutAndWidgetContainer> getAllShortcutAndWidgetContainers() {
ArrayList<ShortcutAndWidgetContainer> childrenLayouts = new ArrayList<>();
int screenCount = getChildCount();
for (int screen = 0; screen < screenCount; screen++) {
childrenLayouts.add(((CellLayout) getChildAt(screen)).getShortcutsAndWidgets());
}
if (mLauncher.getHotseat() != null) {
childrenLayouts.add(mLauncher.getHotseat().getLayout().getShortcutsAndWidgets());
}
return childrenLayouts;
}
public View getHomescreenIconByItemId(final int id) {
return getFirstMatch(new ItemOperator() {
@Override
public boolean evaluate(ItemInfo info, View v) {
return info != null && info.id == id;
}
});
return getFirstMatch((info, v) -> info != null && info.id == id);
}
public LauncherAppWidgetHostView getWidgetForAppWidgetId(final int appWidgetId) {
return (LauncherAppWidgetHostView) getFirstMatch(new ItemOperator() {
@Override
public boolean evaluate(ItemInfo info, View v) {
return (info instanceof LauncherAppWidgetInfo) &&
((LauncherAppWidgetInfo) info).appWidgetId == appWidgetId;
}
});
return (LauncherAppWidgetHostView) getFirstMatch((info, v) ->
(info instanceof LauncherAppWidgetInfo) &&
((LauncherAppWidgetInfo) info).appWidgetId == appWidgetId);
}
public View getFirstMatch(final ItemOperator operator) {
@ -3063,8 +3034,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
* shortcuts are not removed.
*/
public void removeItemsByMatcher(final ItemInfoMatcher matcher) {
ArrayList<CellLayout> cellLayouts = getWorkspaceAndHotseatCellLayouts();
for (final CellLayout layoutParent: cellLayouts) {
for (final CellLayout layoutParent: getWorkspaceAndHotseatCellLayouts()) {
final ViewGroup layout = layoutParent.getShortcutsAndWidgets();
IntSparseArrayMap<View> idToViewMap = new IntSparseArrayMap<>();
@ -3122,10 +3092,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
* @param op the operator to map over the shortcuts
*/
public void mapOverItems(boolean recurse, ItemOperator op) {
ArrayList<ShortcutAndWidgetContainer> containers = getAllShortcutAndWidgetContainers();
final int containerCount = containers.size();
for (int containerIdx = 0; containerIdx < containerCount; containerIdx++) {
ShortcutAndWidgetContainer container = containers.get(containerIdx);
for (CellLayout layout : getWorkspaceAndHotseatCellLayouts()) {
ShortcutAndWidgetContainer container = layout.getShortcutsAndWidgets();
// map over all the shortcuts on the workspace
final int itemCount = container.getChildCount();
for (int itemIdx = 0; itemIdx < itemCount; itemIdx++) {

View File

@ -88,7 +88,7 @@ public class WorkspaceStateTransitionAnimation {
Interpolator scaleInterpolator = builder.getInterpolator(ANIM_WORKSPACE_SCALE, ZOOM_OUT);
propertySetter.setFloat(mWorkspace, SCALE_PROPERTY, mNewScale, scaleInterpolator);
float hotseatIconsAlpha = (elements & HOTSEAT_ICONS) != 0 ? 1 : 0;
propertySetter.setViewAlpha(mLauncher.getHotseat().getLayout(), hotseatIconsAlpha,
propertySetter.setViewAlpha(mLauncher.getHotseat(), hotseatIconsAlpha,
fadeInterpolator);
propertySetter.setViewAlpha(mLauncher.getWorkspace().getPageIndicator(),
hotseatIconsAlpha, fadeInterpolator);
@ -105,9 +105,6 @@ public class WorkspaceStateTransitionAnimation {
propertySetter.setFloat(mWorkspace, View.TRANSLATION_Y,
scaleAndTranslation[2], translationInterpolator);
propertySetter.setViewAlpha(mLauncher.getHotseatSearchBox(),
(elements & HOTSEAT_SEARCH_BOX) != 0 ? 1 : 0, fadeInterpolator);
// Set scrim
WorkspaceAndHotseatScrim scrim = mLauncher.getDragLayer().getScrim();
propertySetter.setFloat(scrim, SCRIM_PROGRESS, state.getWorkspaceScrimAlpha(mLauncher),

View File

@ -91,11 +91,6 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
return mShiftRange;
}
private void onProgressAnimationStart() {
// Initialize values that should not change until #onDragEnd
mAppsView.setVisibility(View.VISIBLE);
}
@Override
public void onDeviceProfileChanged(DeviceProfile dp) {
mIsVerticalLayout = dp.isVerticalBarLayout();
@ -195,16 +190,15 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
PropertySetter setter = config == null ? NO_ANIM_PROPERTY_SETTER
: config.getPropertySetter(builder);
int visibleElements = toState.getVisibleElements(mLauncher);
boolean hasHeader = (visibleElements & ALL_APPS_HEADER) != 0;
boolean hasHeaderExtra = (visibleElements & ALL_APPS_HEADER_EXTRA) != 0;
boolean hasContent = (visibleElements & ALL_APPS_CONTENT) != 0;
Interpolator allAppsFade = builder.getInterpolator(ANIM_ALL_APPS_FADE, LINEAR);
setter.setViewAlpha(mAppsView.getSearchView(), hasHeader ? 1 : 0, allAppsFade);
setter.setViewAlpha(mAppsView.getContentView(), hasContent ? 1 : 0, allAppsFade);
setter.setViewAlpha(mAppsView.getScrollBar(), hasContent ? 1 : 0, allAppsFade);
mAppsView.getFloatingHeaderView().setContentVisibility(hasHeaderExtra, hasContent, setter,
allAppsFade);
mAppsView.getSearchUiManager().setContentVisibility(visibleElements, setter, allAppsFade);
setter.setInt(mScrimView, ScrimView.DRAG_HANDLE_ALPHA,
(visibleElements & VERTICAL_SWIPE_INDICATOR) != 0 ? 255 : 0, LINEAR);
@ -216,11 +210,6 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
public void onAnimationSuccess(Animator animator) {
onProgressAnimationEnd();
}
@Override
public void onAnimationStart(Animator animation) {
onProgressAnimationStart();
}
};
}
@ -247,13 +236,9 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
*/
private void onProgressAnimationEnd() {
if (Float.compare(mProgress, 1f) == 0) {
mAppsView.setVisibility(View.INVISIBLE);
mAppsView.reset(false /* animate */);
} else if (isAllAppsExpanded()) {
mAppsView.setVisibility(View.VISIBLE);
mAppsView.onScrollUpEnd();
} else {
mAppsView.setVisibility(View.VISIBLE);
}
}

View File

@ -16,6 +16,9 @@
package com.android.launcher3.allapps;
import android.view.KeyEvent;
import android.view.animation.Interpolator;
import com.android.launcher3.anim.PropertySetter;
/**
* Interface for controlling the Apps search UI.
@ -37,4 +40,10 @@ public interface SearchUiManager {
* some UI beforehand.
*/
void preDispatchKeyEvent(KeyEvent keyEvent);
/**
* Called as part of state transition to update the content UI
*/
void setContentVisibility(int visibleElements, PropertySetter setter,
Interpolator interpolator);
}

View File

@ -19,6 +19,7 @@ import static android.view.View.MeasureSpec.EXACTLY;
import static android.view.View.MeasureSpec.getSize;
import static android.view.View.MeasureSpec.makeMeasureSpec;
import static com.android.launcher3.LauncherState.ALL_APPS_HEADER;
import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR;
import android.content.Context;
@ -32,6 +33,7 @@ import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup.MarginLayoutParams;
import android.view.animation.Interpolator;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.ExtendedEditText;
@ -42,6 +44,7 @@ import com.android.launcher3.allapps.AllAppsContainerView;
import com.android.launcher3.allapps.AllAppsStore;
import com.android.launcher3.allapps.AlphabeticalAppsList;
import com.android.launcher3.allapps.SearchUiManager;
import com.android.launcher3.anim.PropertySetter;
import com.android.launcher3.graphics.TintedDrawableSpan;
import com.android.launcher3.util.ComponentKey;
@ -214,4 +217,10 @@ public class AppsSearchContainerLayout extends ExtendedEditText
insets.bottom + mlp.topMargin + mFixedTranslationY);
}
}
@Override
public void setContentVisibility(int visibleElements, PropertySetter setter,
Interpolator interpolator) {
setter.setViewAlpha(this, (visibleElements & ALL_APPS_HEADER) != 0 ? 1 : 0, interpolator);
}
}

View File

@ -167,7 +167,7 @@ public class WorkspaceAndHotseatScrim implements
mWorkspace.computeScrollWithoutInvalidation();
CellLayout currCellLayout = mWorkspace.getCurrentDragOverlappingLayout();
canvas.save();
if (currCellLayout != null && currCellLayout != mLauncher.getHotseat().getLayout()) {
if (currCellLayout != null && currCellLayout != mLauncher.getHotseat()) {
// Cut a hole in the darkening scrim on the page that should be highlighted, if any.
mLauncher.getDragLayer()
.getDescendantRectRelativeToSelf(currCellLayout, mHighlightRect);