diff --git a/go/res/xml/device_profiles.xml b/go/res/xml/device_profiles.xml
index 487c026..16d7e13 100644
--- a/go/res/xml/device_profiles.xml
+++ b/go/res/xml/device_profiles.xml
@@ -15,7 +15,7 @@
      limitations under the License.
 -->
 
-<profiles xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3" >
+<profiles xmlns:launcher="http://schemas.android.com/apk/res-auto" >
 
     <profile
         launcher:name="Go Device"
diff --git a/quickstep/res/drawable-hdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..d4f995d
--- /dev/null
+++ b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-hdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..9013c1a
--- /dev/null
+++ b/quickstep/res/drawable-hdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-mdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..6e924ec
--- /dev/null
+++ b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-mdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..33d0edd
--- /dev/null
+++ b/quickstep/res/drawable-mdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..20c85e6
--- /dev/null
+++ b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..58a1ca0
--- /dev/null
+++ b/quickstep/res/drawable-xhdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..9d3dc31
--- /dev/null
+++ b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..7fb248b
--- /dev/null
+++ b/quickstep/res/drawable-xxhdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_left.png b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_left.png
new file mode 100644
index 0000000..49ec7aa
--- /dev/null
+++ b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_left.png
Binary files differ
diff --git a/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_right.png b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_right.png
new file mode 100644
index 0000000..a8922e2
--- /dev/null
+++ b/quickstep/res/drawable-xxxhdpi/recents_horizontal_scrim_right.png
Binary files differ
diff --git a/quickstep/res/layout/longpress_options_menu.xml b/quickstep/res/layout/longpress_options_menu.xml
new file mode 100644
index 0000000..9cf0fcf
--- /dev/null
+++ b/quickstep/res/layout/longpress_options_menu.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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.uioverrides.OptionsPopupView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:launcher="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="96dp"
+    android:background="?attr/popupColorPrimary"
+    android:elevation="@dimen/deep_shortcuts_elevation"
+    android:orientation="horizontal"
+    launcher:layout_ignoreInsets="true">
+
+    <FrameLayout
+        android:id="@+id/wallpaper_button"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:background="?android:attr/selectableItemBackground">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:drawablePadding="4dp"
+            android:drawableTint="?android:attr/textColorPrimary"
+            android:drawableTop="@drawable/ic_wallpaper"
+            android:fontFamily="sans-serif-condensed"
+            android:gravity="center"
+            android:paddingLeft="16dp"
+            android:paddingRight="16dp"
+            android:text="@string/wallpaper_button_text"
+            android:textColor="?android:attr/textColorPrimary"
+            android:textSize="12sp"/>
+    </FrameLayout>
+
+    <FrameLayout
+        android:id="@+id/widget_button"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:background="?android:attr/selectableItemBackground">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:drawablePadding="4dp"
+            android:drawableTint="?android:attr/textColorPrimary"
+            android:drawableTop="@drawable/ic_widget"
+            android:fontFamily="sans-serif-condensed"
+            android:gravity="center"
+            android:paddingLeft="16dp"
+            android:paddingRight="16dp"
+            android:text="@string/widget_button_text"
+            android:textColor="?android:attr/textColorPrimary"
+            android:textSize="12sp"/>
+
+    </FrameLayout>
+
+    <FrameLayout
+        android:id="@+id/settings_button"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:background="?android:attr/selectableItemBackground">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:drawablePadding="4dp"
+            android:drawableTint="?android:attr/textColorPrimary"
+            android:drawableTop="@drawable/ic_setting"
+            android:fontFamily="sans-serif-condensed"
+            android:gravity="center"
+            android:paddingLeft="16dp"
+            android:paddingRight="16dp"
+            android:text="@string/settings_button_text"
+            android:textColor="?android:attr/textColorPrimary"
+            android:textSize="12sp"/>
+
+    </FrameLayout>
+
+</com.android.launcher3.uioverrides.OptionsPopupView>
\ No newline at end of file
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index 9ef8e82..40436d1 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -16,11 +16,14 @@
 
 <resources>
 
+    <dimen name="options_menu_icon_size">24dp</dimen>
+
     <dimen name="task_thumbnail_top_margin">24dp</dimen>
     <dimen name="task_thumbnail_icon_size">48dp</dimen>
     <dimen name="task_menu_background_radius">12dp</dimen>
     <dimen name="task_corner_radius">2dp</dimen>
     <dimen name="task_fade_length">20dp</dimen>
+    <dimen name="recents_page_spacing">10dp</dimen>
 
 
     <dimen name="quickstep_fling_threshold_velocity">500dp</dimen>
diff --git a/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java b/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java
index 6395473..426fe35 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java
@@ -83,7 +83,7 @@
 
     @Override
     public float getHoseatAlpha(Launcher launcher) {
-        return launcher.getDeviceProfile().isVerticalBarLayout() ? 0 : 1;
+        return 0;
     }
 
     @Override
diff --git a/quickstep/src/com/android/launcher3/uioverrides/OptionsPopupView.java b/quickstep/src/com/android/launcher3/uioverrides/OptionsPopupView.java
new file mode 100644
index 0000000..c089d06
--- /dev/null
+++ b/quickstep/src/com/android/launcher3/uioverrides/OptionsPopupView.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+package com.android.launcher3.uioverrides;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Outline;
+import android.graphics.PointF;
+import android.graphics.Rect;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.view.ViewOutlineProvider;
+import android.widget.Toast;
+
+import com.android.launcher3.AbstractFloatingView;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherAnimUtils;
+import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
+import com.android.launcher3.anim.Interpolators;
+import com.android.launcher3.anim.RevealOutlineAnimation;
+import com.android.launcher3.anim.RoundedRectRevealOutlineProvider;
+import com.android.launcher3.dragndrop.DragLayer;
+import com.android.launcher3.graphics.GradientView;
+import com.android.launcher3.widget.WidgetsFullSheet;
+
+/**
+ * Popup shown on long pressing an empty space in launcher
+ */
+public class OptionsPopupView extends AbstractFloatingView implements OnClickListener {
+
+    private final float mOutlineRadius;
+    private final Launcher mLauncher;
+    private final PointF mTouchPoint = new PointF();
+
+    private final GradientView mGradientView;
+
+    protected Animator mOpenCloseAnimator;
+
+    public OptionsPopupView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public OptionsPopupView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+
+        mOutlineRadius = getResources().getDimension(R.dimen.bg_round_rect_radius);
+        setClipToOutline(true);
+        setOutlineProvider(new ViewOutlineProvider() {
+            @Override
+            public void getOutline(View view, Outline outline) {
+                outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), mOutlineRadius);
+            }
+        });
+
+        mLauncher = Launcher.getLauncher(context);
+
+        mGradientView = (GradientView) mLauncher.getLayoutInflater().inflate(
+                R.layout.widgets_bottom_sheet_scrim, mLauncher.getDragLayer(), false);
+        mGradientView.setProgress(1, false);
+        mGradientView.setAlpha(0);
+    }
+
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+        findViewById(R.id.wallpaper_button).setOnClickListener(this);
+        findViewById(R.id.widget_button).setOnClickListener(this);
+        findViewById(R.id.settings_button).setOnClickListener(this);
+    }
+
+    @Override
+    public void onClick(View view) {
+        if (view.getId() == R.id.wallpaper_button) {
+            mLauncher.onClickWallpaperPicker(null);
+            close(true);
+        } else if (view.getId() == R.id.widget_button) {
+            if (mLauncher.getPackageManager().isSafeMode()) {
+                Toast.makeText(mLauncher, R.string.safemode_widget_error, Toast.LENGTH_SHORT).show();
+            } else {
+                WidgetsFullSheet.show(mLauncher, true /* animated */);
+                close(true);
+            }
+        } else if (view.getId() == R.id.settings_button) {
+            mLauncher.startActivity(new Intent(Intent.ACTION_APPLICATION_PREFERENCES)
+                .setPackage(mLauncher.getPackageName())
+                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
+            close(true);
+        }
+    }
+
+    @Override
+    public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
+        if (ev.getAction() != MotionEvent.ACTION_DOWN) {
+            return false;
+        }
+        if (mLauncher.getDragLayer().isEventOverView(this, ev)) {
+            return false;
+        }
+        close(true);
+        return true;
+    }
+
+    @Override
+    protected void handleClose(boolean animate) {
+        if (animate) {
+            animateClose();
+        } else {
+            closeComplete();
+        }
+    }
+
+    protected void animateClose() {
+        if (!mIsOpen) {
+            return;
+        }
+        mIsOpen = false;
+
+        final AnimatorSet closeAnim = LauncherAnimUtils.createAnimatorSet();
+        closeAnim.setDuration(getResources().getInteger(R.integer.config_popupOpenCloseDuration));
+
+        // Rectangular reveal (reversed).
+        final ValueAnimator revealAnim = createOpenCloseOutlineProvider()
+                .createRevealAnimator(this, true);
+        closeAnim.play(revealAnim);
+
+        Animator fadeOut = ObjectAnimator.ofFloat(this, ALPHA, 0);
+        fadeOut.setInterpolator(Interpolators.DEACCEL);
+        closeAnim.play(fadeOut);
+
+        Animator gradientAlpha = ObjectAnimator.ofFloat(mGradientView, ALPHA, 0);
+        gradientAlpha.setInterpolator(Interpolators.DEACCEL);
+        closeAnim.play(gradientAlpha);
+
+        closeAnim.addListener(new AnimatorListenerAdapter() {
+            @Override
+            public void onAnimationEnd(Animator animation) {
+                mOpenCloseAnimator = null;
+                closeComplete();
+            }
+        });
+        if (mOpenCloseAnimator != null) {
+            mOpenCloseAnimator.cancel();
+        }
+        mOpenCloseAnimator = closeAnim;
+        closeAnim.start();
+    }
+
+    /**
+     * Closes the popup without animation.
+     */
+    private void closeComplete() {
+        if (mOpenCloseAnimator != null) {
+            mOpenCloseAnimator.cancel();
+            mOpenCloseAnimator = null;
+        }
+        mIsOpen = false;
+        mLauncher.getDragLayer().removeView(this);
+        mLauncher.getDragLayer().removeView(mGradientView);
+    }
+
+    @Override
+    public void logActionCommand(int command) {
+        // TODO:
+    }
+
+    @Override
+    protected boolean isOfType(int type) {
+        return (type & TYPE_OPTIONS_POPUP) != 0;
+    }
+
+    private RoundedRectRevealOutlineProvider createOpenCloseOutlineProvider() {
+        DragLayer.LayoutParams lp = (DragLayer.LayoutParams) getLayoutParams();
+        Rect startRect = new Rect();
+        startRect.offset((int) (mTouchPoint.x - lp.x), (int) (mTouchPoint.y - lp.y));
+
+        Rect endRect = new Rect(0, 0, lp.width, lp.height);
+        if (getOutlineProvider() instanceof RevealOutlineAnimation) {
+            ((RevealOutlineAnimation) getOutlineProvider()).getOutline(endRect);
+        }
+
+        return new RoundedRectRevealOutlineProvider
+                (mOutlineRadius, mOutlineRadius, startRect, endRect);
+    }
+
+    private void animateOpen() {
+        mIsOpen = true;
+        final AnimatorSet openAnim = LauncherAnimUtils.createAnimatorSet();
+        openAnim.setDuration(getResources().getInteger(R.integer.config_popupOpenCloseDuration));
+
+        final ValueAnimator revealAnim = createOpenCloseOutlineProvider()
+                .createRevealAnimator(this, false);
+        openAnim.play(revealAnim);
+
+        Animator gradientAlpha = ObjectAnimator.ofFloat(mGradientView, ALPHA, 1);
+        gradientAlpha.setInterpolator(Interpolators.ACCEL);
+        openAnim.play(gradientAlpha);
+
+        mOpenCloseAnimator = openAnim;
+
+        openAnim.addListener(new AnimatorListenerAdapter() {
+            @Override
+            public void onAnimationEnd(Animator animation) {
+                mOpenCloseAnimator = null;
+            }
+        });
+        openAnim.start();
+    }
+
+    public static void show(Launcher launcher, float x, float y) {
+        DragLayer dl = launcher.getDragLayer();
+        OptionsPopupView view = (OptionsPopupView) launcher.getLayoutInflater()
+                .inflate(R.layout.longpress_options_menu, dl, false);
+        DragLayer.LayoutParams lp = (DragLayer.LayoutParams) view.getLayoutParams();
+
+        int maxWidth = dl.getWidth();
+        int maxHeight = dl.getHeight();
+        if (x <= 0 || y <= 0 || x >= maxWidth || y >= maxHeight) {
+            x = maxWidth / 2;
+            y = maxHeight / 2;
+        }
+        view.mTouchPoint.set(x, y);
+
+        int height = lp.height;
+
+        // Find a good width;
+        int childCount = view.getChildCount();
+        int heightSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
+        int widthSpec = MeasureSpec.makeMeasureSpec(maxWidth / childCount, MeasureSpec.AT_MOST);
+        int maxChildWidth = 0;
+
+        for (int i = 0; i < childCount; i ++) {
+            View child = ((ViewGroup) view.getChildAt(i)).getChildAt(0);
+            child.measure(widthSpec, heightSpec);
+            maxChildWidth = Math.max(maxChildWidth, child.getMeasuredWidth());
+        }
+        Rect insets = dl.getInsets();
+        int margin = (int) (2 * view.getElevation());
+
+        int width = Math.min(maxWidth - insets.left - insets.right - 2 * margin,
+                maxChildWidth * childCount);
+        lp.width = width;
+
+        // Position is towards the finger
+        lp.customPosition = true;
+        lp.x = Utilities.boundToRange((int) (x - width / 2), insets.left + margin,
+                maxWidth - insets.right - width - margin);
+        lp.y = Utilities.boundToRange((int) (y - height / 2), insets.top + margin,
+                maxHeight - insets.bottom - height - margin);
+
+        launcher.getDragLayer().addView(view.mGradientView);
+        launcher.getDragLayer().addView(view);
+        view.animateOpen();
+    }
+}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index 67a7d6a..c4ffc0f 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -16,25 +16,22 @@
 
 package com.android.launcher3.uioverrides;
 
-import android.content.Intent;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.PointF;
 import android.os.Bundle;
 import android.view.View;
 import android.view.View.AccessibilityDelegate;
-import android.widget.PopupMenu;
-import android.widget.Toast;
 
 import com.android.launcher3.Launcher;
 import com.android.launcher3.LauncherAppTransitionManager;
 import com.android.launcher3.LauncherStateManager.StateHandler;
-import com.android.launcher3.R;
 import com.android.launcher3.config.FeatureFlags;
 import com.android.launcher3.graphics.BitmapRenderer;
 import com.android.launcher3.util.TouchController;
-import com.android.launcher3.widget.WidgetsFullSheet;
 import com.android.quickstep.RecentsView;
 import com.android.systemui.shared.recents.view.RecentsTransition;
+import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
 
 public class UiFactory {
 
@@ -63,31 +60,8 @@
                 new RecentsViewStateController(launcher)};
     }
 
-    public static void onWorkspaceLongPress(Launcher launcher) {
-        PopupMenu menu = new PopupMenu(launcher.getApplicationContext(),
-                launcher.getWorkspace().getPageIndicator());
-
-        menu.getMenu().add(R.string.wallpaper_button_text).setOnMenuItemClickListener((i) -> {
-            launcher.onClickWallpaperPicker(null);
-            return true;
-        });
-        menu.getMenu().add(R.string.widget_button_text).setOnMenuItemClickListener((i) -> {
-            if (launcher.getPackageManager().isSafeMode()) {
-                Toast.makeText(launcher, R.string.safemode_widget_error, Toast.LENGTH_SHORT).show();
-            } else {
-                WidgetsFullSheet.show(launcher, true /* animated */);
-            }
-            return true;
-        });
-        if (launcher.hasSettings()) {
-            menu.getMenu().add(R.string.settings_button_text).setOnMenuItemClickListener((i) -> {
-                launcher.startActivity(new Intent(Intent.ACTION_APPLICATION_PREFERENCES)
-                        .setPackage(launcher.getPackageName())
-                        .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
-                return true;
-            });
-        }
-        menu.show();
+    public static void onWorkspaceLongPress(Launcher launcher, PointF touchPoint) {
+        OptionsPopupView.show(launcher, touchPoint.x, touchPoint.y);
     }
 
     public static Bitmap createFromRenderer(int width, int height, boolean forceSoftwareRenderer,
@@ -107,6 +81,12 @@
     }
 
     public static Bundle getActivityLaunchOptions(Launcher launcher, View v) {
-        return new LauncherAppTransitionManager(launcher).getActivityLauncherOptions(v);
+        try {
+            return new LauncherAppTransitionManager(launcher).getActivityLauncherOptions(v);
+        } catch (NoClassDefFoundError e) {
+            // Gracefully fall back to default launch options if the user's platform doesn't have
+            // the latest changes.
+            return launcher.getDefaultActivityLaunchOptions(v);
+        }
     }
 }
diff --git a/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java b/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java
index 168c1fe..eb5195c 100644
--- a/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java
+++ b/quickstep/src/com/android/quickstep/NavBarSwipeInteractionHandler.java
@@ -27,7 +27,6 @@
 import android.graphics.Color;
 import android.graphics.Rect;
 import android.os.Build;
-import android.os.Handler;
 import android.os.UserHandle;
 import android.support.annotation.UiThread;
 import android.view.View;
@@ -41,12 +40,12 @@
 import com.android.launcher3.LauncherState;
 import com.android.launcher3.R;
 import com.android.launcher3.Utilities;
+import com.android.launcher3.allapps.AllAppsTransitionController;
 import com.android.launcher3.anim.AnimationSuccessListener;
 import com.android.launcher3.anim.Interpolators;
 import com.android.launcher3.states.InternalStateHandler;
 import com.android.launcher3.uioverrides.RecentsViewStateController;
 import com.android.launcher3.util.TraceHelper;
-import com.android.launcher3.views.AllAppsScrim;
 import com.android.systemui.shared.recents.model.RecentsTaskLoadPlan;
 import com.android.systemui.shared.recents.model.Task;
 import com.android.systemui.shared.recents.model.Task.TaskKey;
@@ -61,7 +60,6 @@
     private static final int STATE_SCALED_SNAPSHOT_RECENTS = 1 << 5;
     private static final int STATE_SCALED_SNAPSHOT_APP = 1 << 6;
 
-    private static final long RECENTS_VIEW_VISIBILITY_DURATION = 150;
     private static final long MAX_SWIPE_DURATION = 200;
     private static final long MIN_SWIPE_DURATION = 80;
     private static final int QUICK_SWITCH_SNAP_DURATION = 120;
@@ -98,7 +96,6 @@
     private RecentsViewStateController mStateController;
     private QuickScrubController mQuickScrubController;
     private Hotseat mHotseat;
-    private AllAppsScrim mAllAppsScrim;
 
     private boolean mLauncherReady;
     private boolean mTouchEndHandled;
@@ -188,7 +185,6 @@
         mRecentsView.showTask(mRunningTask);
         mStateController = mRecentsView.getStateController();
         mHotseat = mLauncher.getHotseat();
-        mAllAppsScrim = mLauncher.findViewById(R.id.all_apps_scrim);
 
         AbstractFloatingView.closeAllOpenViews(mLauncher, alreadyOnHome);
         mLauncher.getStateManager().goToState(LauncherState.OVERVIEW, alreadyOnHome);
@@ -242,11 +238,10 @@
         }
 
         float shift = mCurrentShift.value * mActivityMultiplier.value;
-        int hotseatSize = getHotseatSize();
 
-        float hotseatTranslation = (1 - shift) * hotseatSize;
-        mHotseat.setTranslationY(hotseatTranslation);
-        mAllAppsScrim.setTranslationY(hotseatTranslation);
+        AllAppsTransitionController controller = mLauncher.getAllAppsController();
+        float range = getHotseatSize() / controller.getShiftRange();
+        controller.setProgress(1 + (1 - shift) * range);
 
         mRectEvaluator.evaluate(shift, mSourceRect, mTargetRect);
 
@@ -329,8 +324,7 @@
 
     private void cleanupLauncher() {
         // TODO: These should be done as part of ActivityOptions#OnAnimationStarted
-        mHotseat.setTranslationY(0);
-        mAllAppsScrim.setTranslationY(0);
+        mLauncher.getStateManager().reapplyState();
         mLauncher.setOnResumeCallback(() -> mDragView.close(false));
     }
 
diff --git a/quickstep/src/com/android/quickstep/RecentsView.java b/quickstep/src/com/android/quickstep/RecentsView.java
index 605c83c..31f8058 100644
--- a/quickstep/src/com/android/quickstep/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/RecentsView.java
@@ -18,12 +18,25 @@
 
 import android.animation.LayoutTransition;
 import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapShader;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+import android.graphics.PorterDuff.Mode;
+import android.graphics.PorterDuffXfermode;
 import android.graphics.Rect;
+import android.graphics.Shader;
+import android.graphics.Shader.TileMode;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.widget.FrameLayout;
 
 import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.Insettable;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.PagedView;
 import com.android.launcher3.R;
@@ -48,7 +61,7 @@
 /**
  * A list of recent tasks.
  */
-public class RecentsView extends PagedView {
+public class RecentsView extends PagedView implements Insettable {
 
     private static final Rect sTempStableInsets = new Rect();
 
@@ -87,6 +100,12 @@
 
     private Task mFirstTask;
 
+    private Bitmap mScrim;
+    private Paint mFadePaint;
+    private Shader mFadeShader;
+    private Matrix mFadeMatrix;
+    private boolean mScrimOnLeft;
+
     public RecentsView(Context context) {
         this(context, null);
     }
@@ -99,8 +118,8 @@
         super(context, attrs, defStyleAttr);
         setPageSpacing(getResources().getDimensionPixelSize(R.dimen.recents_page_spacing));
         enableFreeScroll(true);
-        setClipChildren(true);
         setupLayoutTransition();
+        setClipToOutline(true);
 
         mLauncher = Launcher.getLauncher(context);
         mQuickScrubController = new QuickScrubController(mLauncher);
@@ -123,10 +142,6 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-
-        Rect padding =
-                getPadding(Launcher.getLauncher(getContext()).getDeviceProfile(), getContext());
-        setPadding(padding.left, padding.top, padding.right, padding.bottom);
         mFirstTaskIndex = getPageCount();
     }
 
@@ -148,6 +163,43 @@
         updateTaskStackListenerState();
     }
 
+    @Override
+    public void setInsets(Rect insets) {
+        mInsets.set(insets);
+        DeviceProfile dp = Launcher.getLauncher(getContext()).getDeviceProfile();
+        Rect padding = getPadding(dp, getContext());
+        FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
+        lp.bottomMargin = padding.bottom;
+        setLayoutParams(lp);
+
+        setPadding(padding.left, padding.top, padding.right, 0);
+
+        if (dp.isVerticalBarLayout()) {
+            boolean wasScrimOnLeft = mScrimOnLeft;
+            mScrimOnLeft = insets.left > insets.right;
+
+            if (mScrim == null || wasScrimOnLeft != mScrimOnLeft) {
+                Drawable scrim = getContext().getDrawable(mScrimOnLeft
+                        ? R.drawable.recents_horizontal_scrim_left
+                        : R.drawable.recents_horizontal_scrim_right);
+                if (scrim instanceof BitmapDrawable) {
+                    mScrim = ((BitmapDrawable) scrim).getBitmap();
+                    mFadePaint = new Paint();
+                    mFadePaint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
+                    mFadeShader = new BitmapShader(mScrim, TileMode.CLAMP, TileMode.REPEAT);
+                    mFadeMatrix = new Matrix();
+                } else {
+                    mScrim = null;
+                }
+            }
+        } else {
+            mScrim = null;
+            mFadePaint = null;
+            mFadeShader = null;
+            mFadeMatrix = null;
+        }
+    }
+
     public int getFirstTaskIndex() {
         return mFirstTaskIndex;
     }
@@ -234,10 +286,9 @@
         if (profile.isVerticalBarLayout()) {
             // Use the same padding on both sides for symmetry.
             float availableWidth = taskWidth - 2 * Math.max(padding.left, padding.right);
-            float availableHeight = profile.availableHeightPx - padding.top - padding.bottom
-                    - sTempStableInsets.top
-                    - profile.heightPx * (1 - OverviewState.getVerticalProgress(profile, context));
-
+            float availableHeight = profile.availableHeightPx - padding.top
+                    - sTempStableInsets.top - Math.max(padding.bottom,
+                    profile.heightPx * (1 - OverviewState.getVerticalProgress(profile, context)));
             float scaledRatio = Math.min(availableWidth / taskWidth, availableHeight / taskHeight);
             overviewHeight = taskHeight * scaledRatio;
             overviewWidth = taskWidth * scaledRatio;
@@ -306,11 +357,11 @@
         if (getPageCount() == 0 || getPageAt(0).getMeasuredWidth() == 0) {
             return;
         }
-        final int halfScreenWidth = getMeasuredWidth() / 2;
-        final int screenCenter = halfScreenWidth + getScrollX();
-        final int pageSpacing = mPageSpacing;
         final int halfPageWidth = mScrollState.halfPageWidth = getNormalChildWidth() / 2;
         mScrollState.lastScrollType = SCROLL_TYPE_NONE;
+        final int screenCenter = mInsets.left + getPaddingLeft() + getScrollX() + halfPageWidth;
+        final int halfScreenWidth = getMeasuredWidth() / 2;
+        final int pageSpacing = mPageSpacing;
 
         final int pageCount = getPageCount();
         for (int i = 0; i < pageCount; i++) {
@@ -387,7 +438,9 @@
         }
         mFirstTask = task;
         setCurrentPage(mFirstTaskIndex);
-        ((TaskView) getPageAt(mCurrentPage)).setIconScale(0);
+        if (mCurrentPage >= mFirstTaskIndex) {
+            ((TaskView) getPageAt(mCurrentPage)).setIconScale(0);
+        }
     }
 
     private static boolean keysEquals(Task t1, Task t2) {
@@ -399,6 +452,35 @@
         return mQuickScrubController;
     }
 
+    @Override
+    public void draw(Canvas canvas) {
+        if (mScrim == null) {
+            super.draw(canvas);
+            return;
+        }
+
+        final int flags = Canvas.HAS_ALPHA_LAYER_SAVE_FLAG;
+
+        int length = mScrim.getWidth();
+        int height = getHeight();
+        int saveCount = canvas.getSaveCount();
+
+        int scrimLeft;
+        if (mScrimOnLeft) {
+            scrimLeft = getScrollX();
+        } else {
+            scrimLeft = getScrollX() + getWidth() - length;
+        }
+        canvas.saveLayer(scrimLeft, 0, scrimLeft + length, height, null, flags);
+        super.draw(canvas);
+
+        mFadeMatrix.setTranslate(scrimLeft, 0);
+        mFadeShader.setLocalMatrix(mFadeMatrix);
+        mFadePaint.setShader(mFadeShader);
+        canvas.drawRect(scrimLeft, 0, scrimLeft + length, height, mFadePaint);
+        canvas.restoreToCount(saveCount);
+    }
+
     public interface PageCallbacks {
 
         /**
diff --git a/quickstep/src/com/android/quickstep/TaskMenuView.java b/quickstep/src/com/android/quickstep/TaskMenuView.java
index bf75376..196a227 100644
--- a/quickstep/src/com/android/quickstep/TaskMenuView.java
+++ b/quickstep/src/com/android/quickstep/TaskMenuView.java
@@ -35,6 +35,7 @@
 import com.android.launcher3.Launcher;
 import com.android.launcher3.LauncherAnimUtils;
 import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
 import com.android.launcher3.anim.AnimationSuccessListener;
 import com.android.launcher3.anim.RoundedRectRevealOutlineProvider;
 import com.android.launcher3.dragndrop.DragLayer;
@@ -170,7 +171,8 @@
         measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
         mLauncher.getDragLayer().getDescendantRectRelativeToSelf(taskView, sTempRect);
         Rect insets = mLauncher.getDragLayer().getInsets();
-        setX(sTempRect.left + (sTempRect.width() - getMeasuredWidth()) / 2 - insets.left);
+        int x = sTempRect.left + (sTempRect.width() - getMeasuredWidth()) / 2 - insets.left;
+        setX(Utilities.isRtl(getResources()) ? -x : x);
         setY(sTempRect.top - mTaskIconAndName.getPaddingTop() - insets.top);
     }
 
diff --git a/res/drawable/ic_setting.xml b/res/drawable/ic_setting.xml
index 1bab189..08eba25 100644
--- a/res/drawable/ic_setting.xml
+++ b/res/drawable/ic_setting.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="48dp"
-        android:height="48dp"
+        android:width="@dimen/options_menu_icon_size"
+        android:height="@dimen/options_menu_icon_size"
         android:viewportWidth="48.0"
         android:viewportHeight="48.0">
     <path
diff --git a/res/drawable/ic_wallpaper.xml b/res/drawable/ic_wallpaper.xml
index 9e9222f..0c5a125 100644
--- a/res/drawable/ic_wallpaper.xml
+++ b/res/drawable/ic_wallpaper.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="48dp"
-        android:height="48dp"
+        android:width="@dimen/options_menu_icon_size"
+        android:height="@dimen/options_menu_icon_size"
         android:viewportWidth="48.0"
         android:viewportHeight="48.0">
     <path
diff --git a/res/drawable/ic_widget.xml b/res/drawable/ic_widget.xml
index de2980f..4bb23b3 100644
--- a/res/drawable/ic_widget.xml
+++ b/res/drawable/ic_widget.xml
@@ -14,12 +14,12 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="48dp"
-        android:height="48dp"
+        android:width="@dimen/options_menu_icon_size"
+        android:height="@dimen/options_menu_icon_size"
         android:viewportWidth="48.0"
         android:viewportHeight="48.0">
     <path
-        android:fillColor="#FFFFFFFF"
+        android:fillColor="?android:attr/textColorPrimary"
         android:pathData="M26,28v12c0,1,0.8,2,2,2h12c1,0,2-1,2-2V28c0-1.2-1-2-2-2H28C26.8,26,26,26.8,26,28z M8,42h12c1.2,0,2-1,2-2V28
         c0-1.2-0.8-2-2-2H8c-1,0-2,0.8-2,2v12C6,41,7,42,8,42z M6,8v12c0,1.2,1,2,2,2h12c1.2,0,2-0.8,2-2V8c0-1-0.8-2-2-2H8C7,6,6,7,6,8z
         M32.6,4.6l-8,8c-0.8,0.8-0.8,2,0,2.8l8,8c0.8,0.8,2,0.8,2.8,0l8-8c0.8-0.8,0.8-2,0-2.8l-8-8C34.6,3.8,33.4,3.8,32.6,4.6z"/>
diff --git a/res/drawable/round_rect_primary.xml b/res/drawable/round_rect_primary.xml
index 2c47e06..9f8f4da 100644
--- a/res/drawable/round_rect_primary.xml
+++ b/res/drawable/round_rect_primary.xml
@@ -17,5 +17,5 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
     <solid android:color="?android:attr/colorPrimary" />
-    <corners android:radius="2dp" />
+    <corners android:radius="8dp" />
 </shape>
diff --git a/res/drawable/tooltip_frame.xml b/res/drawable/tooltip_frame.xml
new file mode 100644
index 0000000..0319051
--- /dev/null
+++ b/res/drawable/tooltip_frame.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2018 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.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="?android:attr/colorBackground" />
+    <corners android:radius="2dp" />
+</shape>
\ No newline at end of file
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index f26bfbd..bcaba81 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -67,7 +67,7 @@
 
         <include
             android:id="@+id/drop_target_bar"
-            layout="@layout/drop_target_bar_vert" />
+            layout="@layout/drop_target_bar" />
 
         <include layout="@layout/all_apps"
             android:id="@+id/apps_view"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index cde3bd5..eb9c34c 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -66,7 +66,7 @@
 
         <include
             android:id="@+id/drop_target_bar"
-            layout="@layout/drop_target_bar_horz" />
+            layout="@layout/drop_target_bar" />
 
         <include layout="@layout/all_apps"
             android:id="@+id/apps_view"
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index fe2f108..fa1a100 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -60,7 +60,7 @@
 
         <include
             android:id="@+id/drop_target_bar"
-            layout="@layout/drop_target_bar_horz" />
+            layout="@layout/drop_target_bar" />
 
         <!-- Keep these behind the workspace so that they are not visible when
              we go into AllApps -->
diff --git a/res/layout/drop_target_bar.xml b/res/layout/drop_target_bar.xml
new file mode 100644
index 0000000..d376bcf
--- /dev/null
+++ b/res/layout/drop_target_bar.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+     Copyright (C) 2018 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.DropTargetBar xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/dynamic_grid_drop_target_size"
+    android:layout_gravity="center_horizontal|top"
+    android:focusable="false"
+    android:alpha="0"
+    android:theme="@style/HomeScreenElementTheme"
+    android:visibility="invisible">
+
+    <!-- Delete target -->
+    <com.android.launcher3.DeleteDropTarget
+        android:id="@+id/delete_target_text"
+        style="@style/DropTargetButton"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:gravity="center"
+        android:text="@string/remove_drop_target_label" />
+
+    <!-- App Info -->
+    <com.android.launcher3.InfoDropTarget
+        android:id="@+id/info_target_text"
+        style="@style/DropTargetButton"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:gravity="center"
+        android:text="@string/app_info_drop_target_label" />
+
+    <!-- Uninstall target -->
+    <com.android.launcher3.UninstallDropTarget
+        android:id="@+id/uninstall_target_text"
+        style="@style/DropTargetButton"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:gravity="center"
+        android:text="@string/uninstall_drop_target_label" />
+
+</com.android.launcher3.DropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_bar_horz.xml b/res/layout/drop_target_bar_horz.xml
deleted file mode 100644
index ed18192..0000000
--- a/res/layout/drop_target_bar_horz.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2015 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.DropTargetBar
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res-auto"
-    android:theme="@style/HomeScreenElementTheme"
-    android:layout_width="match_parent"
-    android:layout_height="@dimen/dynamic_grid_drop_target_size"
-    android:visibility="invisible"
-    android:layout_gravity="center_horizontal|top"
-    android:focusable="false">
-
-    <FrameLayout
-        android:layout_width="0dp"
-        android:layout_height="match_parent"
-        android:layout_weight="1" >
-
-        <!-- Delete target -->
-
-        <com.android.launcher3.DeleteDropTarget
-            launcher:hideParentOnDisable="true"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_gravity="center"
-            android:gravity="center"
-            android:id="@+id/delete_target_text"
-            style="@style/DropTargetButton"
-            android:text="@string/remove_drop_target_label" />
-    </FrameLayout>
-
-    <FrameLayout
-        android:layout_width="0dp"
-        android:layout_height="match_parent"
-        android:layout_weight="1" >
-
-        <!-- App Info -->
-
-        <com.android.launcher3.InfoDropTarget
-            launcher:hideParentOnDisable="true"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_gravity="center"
-            android:gravity="center"
-            android:id="@+id/info_target_text"
-            style="@style/DropTargetButton"
-            android:text="@string/app_info_drop_target_label" />
-    </FrameLayout>
-
-    <FrameLayout
-        android:layout_width="0dp"
-        android:layout_height="match_parent"
-        android:layout_weight="1" >
-
-        <!-- Uninstall target -->
-
-        <com.android.launcher3.UninstallDropTarget
-            launcher:hideParentOnDisable="true"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_gravity="center"
-            android:gravity="center"
-            android:id="@+id/uninstall_target_text"
-            style="@style/DropTargetButton"
-            android:text="@string/uninstall_drop_target_label" />
-    </FrameLayout>
-
-</com.android.launcher3.DropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_bar_vert.xml b/res/layout/drop_target_bar_vert.xml
deleted file mode 100644
index 2394d0d..0000000
--- a/res/layout/drop_target_bar_vert.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2016 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.DropTargetBar
-    android:theme="@style/HomeScreenElementTheme"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="@dimen/dynamic_grid_drop_target_size"
-    android:orientation="vertical"
-    android:layout_height="match_parent"
-    android:layout_gravity="left"
-    android:visibility="invisible"
-    android:focusable="false"
-    android:paddingTop="@dimen/vert_drop_target_vertical_gap" >
-
-    <!-- Delete target -->
-    <com.android.launcher3.DeleteDropTarget
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dynamic_grid_drop_target_size"
-        android:gravity="center"
-        android:paddingLeft="@dimen/vert_drop_target_horizontal_gap"
-        android:paddingRight="@dimen/vert_drop_target_horizontal_gap"
-        android:id="@+id/delete_target_text" />
-
-    <!-- Uninstall target -->
-    <com.android.launcher3.UninstallDropTarget
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dynamic_grid_drop_target_size"
-        android:gravity="center"
-        android:paddingLeft="@dimen/vert_drop_target_horizontal_gap"
-        android:paddingRight="@dimen/vert_drop_target_horizontal_gap"
-        android:id="@+id/uninstall_target_text"
-        android:layout_marginTop="@dimen/vert_drop_target_vertical_gap"/>
-
-    <Space
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1" />
-
-    <!-- App Info -->
-    <com.android.launcher3.InfoDropTarget
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/dynamic_grid_drop_target_size"
-        android:gravity="center"
-        android:paddingLeft="@dimen/vert_drop_target_horizontal_gap"
-        android:paddingRight="@dimen/vert_drop_target_horizontal_gap"
-        android:id="@+id/info_target_text"
-        android:layout_marginBottom="64dp"/>
-
-</com.android.launcher3.DropTargetBar>
\ No newline at end of file
diff --git a/res/layout/drop_target_tool_tip.xml b/res/layout/drop_target_tool_tip.xml
new file mode 100644
index 0000000..a3efec4
--- /dev/null
+++ b/res/layout/drop_target_tool_tip.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+     Copyright (C) 2018 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.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/message"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:background="@drawable/tooltip_frame"
+    android:ellipsize="end"
+    android:maxLines="1"
+    android:maxWidth="256dp"
+    android:paddingBottom="6.5dp"
+    android:paddingEnd="16dp"
+    android:paddingStart="16dp"
+    android:paddingTop="6.5dp"
+    android:textSize="14sp"
+    android:fontFamily="sans-serif"
+    android:textColor="?android:attr/colorForeground" />
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index ad5f0b8..2033d46 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -91,10 +91,6 @@
         <attr name="layout_ignoreInsets" format="boolean" />
     </declare-styleable>
 
-    <declare-styleable name="ButtonDropTarget">
-        <attr name="hideParentOnDisable" format="boolean" />
-    </declare-styleable>
-
     <declare-styleable name="InvariantDeviceProfile">
         <attr name="name" format="string" />
         <attr name="minWidthDps" format="float" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f53fe79..2aff936 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -43,14 +43,13 @@
     <dimen name="dynamic_grid_hotseat_side_padding">0dp</dimen>
 
     <!-- Hotseat/all-apps scrim -->
-    <dimen name="all_apps_scrim_radius">10dp</dimen>
-    <dimen name="all_apps_scrim_margin">10dp</dimen>
-    <dimen name="all_apps_scrim_blur">5dp</dimen>
+    <dimen name="all_apps_scrim_radius">8dp</dimen>
+    <dimen name="all_apps_scrim_margin">8dp</dimen>
+    <dimen name="all_apps_scrim_blur">4dp</dimen>
 
 <!-- Drop target bar -->
     <dimen name="dynamic_grid_drop_target_size">48dp</dimen>
-    <dimen name="vert_drop_target_vertical_gap">20dp</dimen>
-    <dimen name="vert_drop_target_horizontal_gap">14dp</dimen>
+    <dimen name="drop_target_vertical_gap">20dp</dimen>
 
 <!-- App Widget resize frame -->
     <dimen name="widget_handle_margin">13dp</dimen>
@@ -204,7 +203,7 @@
     <dimen name="system_shortcut_header_icon_padding">12dp</dimen>
 
 <!-- Notifications -->
-    <dimen name="bg_round_rect_radius">12dp</dimen>
+    <dimen name="bg_round_rect_radius">8dp</dimen>
     <dimen name="notification_padding_start">16dp</dimen>
     <dimen name="notification_padding_end">12dp</dimen>
     <!-- notification_padding_end + (icon_size - footer_icon_size) / 2 -->
@@ -228,6 +227,6 @@
     <dimen name="popup_item_divider_height">0.5dp</dimen>
     <dimen name="swipe_helper_falsing_threshold">70dp</dimen>
 
-<!-- Recents -->
-    <dimen name="recents_page_spacing">10dp</dimen>
+<!-- Overview -->
+    <dimen name="options_menu_icon_size">48dp</dimen>
 </resources>
diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java
index 824040a..12f022f 100644
--- a/src/com/android/launcher3/AbstractFloatingView.java
+++ b/src/com/android/launcher3/AbstractFloatingView.java
@@ -42,9 +42,11 @@
             TYPE_WIDGETS_BOTTOM_SHEET,
             TYPE_WIDGET_RESIZE_FRAME,
             TYPE_WIDGETS_FULL_SHEET,
-            TYPE_QUICKSTEP_PREVIEW,
             TYPE_ON_BOARD_POPUP,
-            TYPE_TASK_MENU
+
+            TYPE_QUICKSTEP_PREVIEW,
+            TYPE_TASK_MENU,
+            TYPE_OPTIONS_POPUP
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface FloatingViewType {}
@@ -53,17 +55,20 @@
     public static final int TYPE_WIDGETS_BOTTOM_SHEET = 1 << 2;
     public static final int TYPE_WIDGET_RESIZE_FRAME = 1 << 3;
     public static final int TYPE_WIDGETS_FULL_SHEET = 1 << 4;
-    public static final int TYPE_QUICKSTEP_PREVIEW = 1 << 5;
-    public static final int TYPE_ON_BOARD_POPUP = 1 << 6;
+    public static final int TYPE_ON_BOARD_POPUP = 1 << 5;
+
+    // Popups related to quickstep UI
+    public static final int TYPE_QUICKSTEP_PREVIEW = 1 << 6;
     public static final int TYPE_TASK_MENU = 1 << 7;
+    public static final int TYPE_OPTIONS_POPUP = 1 << 8;
 
     public static final int TYPE_ALL = TYPE_FOLDER | TYPE_ACTION_POPUP
             | TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET
-            | TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP | TYPE_TASK_MENU;
+            | TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP | TYPE_TASK_MENU | TYPE_OPTIONS_POPUP;
 
     // Type of popups which should be kept open during launcher rebind
     public static final int TYPE_REBIND_SAFE = TYPE_WIDGETS_FULL_SHEET
-            | TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP;
+            | TYPE_QUICKSTEP_PREVIEW | TYPE_ON_BOARD_POPUP | TYPE_OPTIONS_POPUP;
 
     protected boolean mIsOpen;
 
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java
index cfb55cc..a9cf8cc 100644
--- a/src/com/android/launcher3/ButtonDropTarget.java
+++ b/src/com/android/launcher3/ButtonDropTarget.java
@@ -16,27 +16,28 @@
 
 package com.android.launcher3;
 
+import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
+
 import static com.android.launcher3.LauncherState.NORMAL;
 
 import android.animation.AnimatorSet;
 import android.animation.FloatArrayEvaluator;
 import android.animation.ObjectAnimator;
 import android.animation.ValueAnimator;
-import android.animation.ValueAnimator.AnimatorUpdateListener;
 import android.content.Context;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
-import android.content.res.TypedArray;
 import android.graphics.ColorMatrix;
 import android.graphics.ColorMatrixColorFilter;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.text.TextUtils;
 import android.util.AttributeSet;
+import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
-import android.view.ViewGroup;
 import android.view.accessibility.AccessibilityEvent;
+import android.widget.PopupWindow;
 import android.widget.TextView;
 
 import com.android.launcher3.anim.Interpolators;
@@ -56,7 +57,10 @@
     private static final int[] sTempCords = new int[2];
     private static final int DRAG_VIEW_DROP_DURATION = 285;
 
-    private final boolean mHideParentOnDisable;
+    public static final int TOOLTIP_DEFAULT = 0;
+    public static final int TOOLTIP_LEFT = 1;
+    public static final int TOOLTIP_RIGHT = 2;
+
     protected final Launcher mLauncher;
 
     private int mBottomDragPadding;
@@ -75,6 +79,10 @@
     protected CharSequence mText;
     protected ColorStateList mOriginalTextColor;
     protected Drawable mDrawable;
+    private boolean mTextVisible = true;
+
+    private PopupWindow mToolTip;
+    private int mToolTipLocation;
 
     private AnimatorSet mCurrentColorAnim;
     @Thunk ColorMatrix mSrcFilter, mDstFilter, mCurrentFilter;
@@ -89,11 +97,6 @@
 
         Resources resources = getResources();
         mBottomDragPadding = resources.getDimensionPixelSize(R.dimen.drop_target_drag_padding);
-
-        TypedArray a = context.obtainStyledAttributes(attrs,
-                R.styleable.ButtonDropTarget, defStyle, 0);
-        mHideParentOnDisable = a.getBoolean(R.styleable.ButtonDropTarget_hideParentOnDisable, false);
-        a.recycle();
         mDragDistanceThreshold = resources.getDimensionPixelSize(R.dimen.drag_distanceThreshold);
     }
 
@@ -102,21 +105,56 @@
         super.onFinishInflate();
         mText = getText();
         mOriginalTextColor = getTextColors();
+        setContentDescription(mText);
     }
 
     protected void setDrawable(int resId) {
         // We do not set the drawable in the xml as that inflates two drawables corresponding to
         // drawableLeft and drawableStart.
-        setCompoundDrawablesRelativeWithIntrinsicBounds(resId, 0, 0, 0);
-        mDrawable = getCompoundDrawablesRelative()[0];
+        if (mTextVisible) {
+            setCompoundDrawablesRelativeWithIntrinsicBounds(resId, 0, 0, 0);
+            mDrawable = getCompoundDrawablesRelative()[0];
+        } else {
+            setCompoundDrawablesRelativeWithIntrinsicBounds(0, resId, 0, 0);
+            mDrawable = getCompoundDrawablesRelative()[1];
+        }
     }
 
     public void setDropTargetBar(DropTargetBar dropTargetBar) {
         mDropTargetBar = dropTargetBar;
     }
 
+    private void hideTooltip() {
+        if (mToolTip != null) {
+            mToolTip.dismiss();
+            mToolTip = null;
+        }
+    }
+
     @Override
     public final void onDragEnter(DragObject d) {
+        if (!d.accessibleDrag && !mTextVisible) {
+            // Show tooltip
+            hideTooltip();
+
+            TextView message = (TextView) LayoutInflater.from(getContext()).inflate(
+                    R.layout.drop_target_tool_tip, null);
+            message.setText(mText);
+
+            mToolTip = new PopupWindow(message, WRAP_CONTENT, WRAP_CONTENT);
+            int x = 0, y = 0;
+            if (mToolTipLocation != TOOLTIP_DEFAULT) {
+                y = -getMeasuredHeight();
+                message.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
+                if (mToolTipLocation == TOOLTIP_LEFT) {
+                    x = - getMeasuredWidth() - message.getMeasuredWidth() / 2;
+                } else {
+                    x = getMeasuredWidth() / 2 + message.getMeasuredWidth() / 2;
+                }
+            }
+            mToolTip.showAsDropDown(this, x, y);
+        }
+
         d.dragView.setColor(mHoverColor);
         animateTextColor(mHoverColor);
         if (d.stateAnnouncer != null) {
@@ -153,13 +191,9 @@
         ValueAnimator anim1 = ValueAnimator.ofObject(
                 new FloatArrayEvaluator(mCurrentFilter.getArray()),
                 mSrcFilter.getArray(), mDstFilter.getArray());
-        anim1.addUpdateListener(new AnimatorUpdateListener() {
-
-            @Override
-            public void onAnimationUpdate(ValueAnimator animation) {
-                mDrawable.setColorFilter(new ColorMatrixColorFilter(mCurrentFilter));
-                invalidate();
-            }
+        anim1.addUpdateListener((anim) -> {
+            mDrawable.setColorFilter(new ColorMatrixColorFilter(mCurrentFilter));
+            invalidate();
         });
 
         mCurrentColorAnim.play(anim1);
@@ -169,6 +203,8 @@
 
     @Override
     public final void onDragExit(DragObject d) {
+        hideTooltip();
+
         if (!d.dragComplete) {
             d.dragView.setColor(0);
             resetHoverColor();
@@ -187,8 +223,7 @@
             mCurrentColorAnim = null;
         }
         setTextColor(mOriginalTextColor);
-        (mHideParentOnDisable ? ((ViewGroup) getParent()) : this)
-                .setVisibility(mActive ? View.VISIBLE : View.GONE);
+        setVisibility(mActive ? View.VISIBLE : View.GONE);
 
         mAccessibleDrag = options.isAccessibleDrag;
         setOnClickListener(mAccessibleDrag ? this : null);
@@ -230,14 +265,12 @@
         final float scale = (float) to.width() / from.width();
         mDropTargetBar.deferOnDragEnd();
 
-        Runnable onAnimationEndRunnable = new Runnable() {
-            @Override
-            public void run() {
-                completeDrop(d);
-                mDropTargetBar.onDragEnd();
-                mLauncher.getStateManager().goToState(NORMAL);
-            }
+        Runnable onAnimationEndRunnable = () -> {
+            completeDrop(d);
+            mDropTargetBar.onDragEnd();
+            mLauncher.getStateManager().goToState(NORMAL);
         };
+
         dragLayer.animateView(d.dragView, from, to, scale, 1f, 1f, 0.1f, 0.1f,
                 DRAG_VIEW_DROP_DURATION,
                 Interpolators.DEACCEL_2, Interpolators.LINEAR, onAnimationEndRunnable,
@@ -294,8 +327,8 @@
         to.set(left, top, right, bottom);
 
         // Center the destination rect about the trash icon
-        final int xOffset = (int) -(viewWidth - width) / 2;
-        final int yOffset = (int) -(viewHeight - height) / 2;
+        final int xOffset = -(viewWidth - width) / 2;
+        final int yOffset = -(viewHeight - height) / 2;
         to.offset(xOffset, yOffset);
 
         return to;
@@ -310,25 +343,24 @@
         return getTextColors().getDefaultColor();
     }
 
-    /**
-     * Returns True if any update was made.
-     */
-    public boolean updateText(boolean hide) {
-        if ((hide && getText().toString().isEmpty()) || (!hide && mText.equals(getText()))) {
-            return false;
+    public void setTextVisible(boolean isVisible) {
+        if (mTextVisible != isVisible) {
+            mTextVisible = isVisible;
+            setText(isVisible ? mText : "");
+            if (mTextVisible) {
+                setCompoundDrawablesRelativeWithIntrinsicBounds(mDrawable, null, null, null);
+            } else {
+                setCompoundDrawablesRelativeWithIntrinsicBounds(null, mDrawable, null, null);
+            }
         }
-
-        setText(hide ? "" : mText);
-        return true;
     }
 
-    public boolean isTextTruncated() {
-        int availableWidth = getMeasuredWidth();
-        if (mHideParentOnDisable) {
-            ViewGroup parent = (ViewGroup) getParent();
-            availableWidth = parent.getMeasuredWidth() - parent.getPaddingLeft()
-                    - parent.getPaddingRight();
-        }
+    public void setToolTipLocation(int location) {
+        mToolTipLocation = location;
+        hideTooltip();
+    }
+
+    public boolean isTextTruncated(int availableWidth) {
         availableWidth -= (getPaddingLeft() + getPaddingRight() + mDrawable.getIntrinsicWidth()
                 + getCompoundDrawablePadding());
         CharSequence displayedText = TextUtils.ellipsize(mText, getPaint(), availableWidth,
diff --git a/src/com/android/launcher3/DropTargetBar.java b/src/com/android/launcher3/DropTargetBar.java
index 494aae4..d78043d 100644
--- a/src/com/android/launcher3/DropTargetBar.java
+++ b/src/com/android/launcher3/DropTargetBar.java
@@ -17,6 +17,9 @@
 package com.android.launcher3;
 
 import static com.android.launcher3.AlphaUpdateListener.updateVisibility;
+import static com.android.launcher3.ButtonDropTarget.TOOLTIP_DEFAULT;
+import static com.android.launcher3.ButtonDropTarget.TOOLTIP_LEFT;
+import static com.android.launcher3.ButtonDropTarget.TOOLTIP_RIGHT;
 import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled;
 
 import android.animation.TimeInterpolator;
@@ -26,22 +29,18 @@
 import android.view.Gravity;
 import android.view.View;
 import android.view.ViewDebug;
-import android.view.ViewGroup;
 import android.view.ViewPropertyAnimator;
 import android.widget.FrameLayout;
-import android.widget.LinearLayout;
 
 import com.android.launcher3.anim.Interpolators;
 import com.android.launcher3.dragndrop.DragController;
 import com.android.launcher3.dragndrop.DragController.DragListener;
 import com.android.launcher3.dragndrop.DragOptions;
 
-import java.util.ArrayList;
-
 /*
  * The top bar containing various drop targets: Delete/App Info/Uninstall.
  */
-public class DropTargetBar extends LinearLayout
+public class DropTargetBar extends FrameLayout
         implements DragListener, Insettable {
 
     protected static final int DEFAULT_DRAG_FADE_DURATION = 175;
@@ -59,6 +58,8 @@
     private ButtonDropTarget[] mDropTargets;
     private ViewPropertyAnimator mCurrentAnimation;
 
+    private boolean mIsVertical = true;
+
     public DropTargetBar(Context context, AttributeSet attrs) {
         super(context, attrs);
     }
@@ -70,25 +71,30 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-
-        // Initialize with hidden state
-        setAlpha(0f);
+        mDropTargets = new ButtonDropTarget[getChildCount()];
+        for (int i = 0; i < mDropTargets.length; i++) {
+            mDropTargets[i] = (ButtonDropTarget) getChildAt(i);
+            mDropTargets[i].setDropTargetBar(this);
+        }
     }
 
     @Override
     public void setInsets(Rect insets) {
         FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
         DeviceProfile grid = Launcher.getLauncher(getContext()).getDeviceProfile();
+        mIsVertical = grid.isVerticalBarLayout();
 
         lp.leftMargin = insets.left;
         lp.topMargin = insets.top;
         lp.bottomMargin = insets.bottom;
         lp.rightMargin = insets.right;
+        int tooltipLocation = TOOLTIP_DEFAULT;
 
         if (grid.isVerticalBarLayout()) {
             lp.width = grid.dropTargetBarSizePx;
             lp.height = grid.availableHeightPx - 2 * grid.edgeMarginPx;
             lp.gravity = insets.left > insets.right ? Gravity.RIGHT : Gravity.LEFT;
+            tooltipLocation = insets.left > insets.right ? TOOLTIP_LEFT : TOOLTIP_RIGHT;
         } else {
             int gap;
             if (grid.isTablet) {
@@ -107,83 +113,95 @@
             lp.height = grid.dropTargetBarSizePx;
         }
         setLayoutParams(lp);
+        for (ButtonDropTarget button : mDropTargets) {
+            button.setToolTipLocation(tooltipLocation);
+        }
     }
 
     public void setup(DragController dragController) {
         dragController.addDragListener(this);
-        ArrayList<ButtonDropTarget> outList = new ArrayList<>();
-        findDropTargets(this, outList);
-
-        mDropTargets = new ButtonDropTarget[outList.size()];
         for (int i = 0; i < mDropTargets.length; i++) {
-            mDropTargets[i] = outList.get(i);
-            mDropTargets[i].setDropTargetBar(this);
             dragController.addDragListener(mDropTargets[i]);
             dragController.addDropTarget(mDropTargets[i]);
         }
     }
 
-    private static void findDropTargets(View view, ArrayList<ButtonDropTarget> outTargets) {
-        if (view instanceof ButtonDropTarget) {
-            outTargets.add((ButtonDropTarget) view);
-        } else if (view instanceof ViewGroup) {
-            ViewGroup vg = (ViewGroup) view;
-            for (int i = vg.getChildCount() - 1; i >= 0; i--) {
-                findDropTargets(vg.getChildAt(i), outTargets);
-            }
-        }
-    }
-
     @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+        int width = MeasureSpec.getSize(widthMeasureSpec);
+        int height = MeasureSpec.getSize(heightMeasureSpec);
 
-        boolean hideText = hideTextHelper(false /* shouldUpdateText */, false /* no-op */);
-        if (hideTextHelper(true /* shouldUpdateText */, hideText)) {
-            // Text has changed, so we need to re-measure.
-            super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-        }
-    }
+        if (mIsVertical) {
+            int widthSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY);
+            int heightSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST);
 
-    /**
-     * Helper method that iterates through the children and returns whether any of the visible
-     * {@link ButtonDropTarget} has truncated text.
-     *
-     * @param shouldUpdateText If True, updates the text of all children.
-     * @param hideText If True and {@param shouldUpdateText} is True, clears the text of all
-     *                 children; otherwise it sets the original text value.
-     *
-     *
-     * @return If shouldUpdateText is True, returns whether any of the children updated their text.
-     *         Else, returns whether any of the children have truncated their text.
-     */
-    private boolean hideTextHelper(boolean shouldUpdateText, boolean hideText) {
-        boolean result = false;
-        View visibleView;
-        ButtonDropTarget dropTarget;
-        for (int i = getChildCount() - 1; i >= 0; --i) {
-            if (getChildAt(i) instanceof ButtonDropTarget) {
-                visibleView = dropTarget = (ButtonDropTarget) getChildAt(i);
-            } else if (getChildAt(i) instanceof ViewGroup) {
-                // The Drop Target is wrapped in a FrameLayout.
-                visibleView = getChildAt(i);
-                dropTarget = (ButtonDropTarget) ((ViewGroup) visibleView).getChildAt(0);
-            } else {
-                // Ignore other views.
-                continue;
+            for (ButtonDropTarget button : mDropTargets) {
+                if (button.getVisibility() != GONE) {
+                    button.setTextVisible(false);
+                    button.measure(widthSpec, heightSpec);
+                }
+            }
+        } else {
+            int visibleCount = getVisibleButtonsCount();
+            int availableWidth = width / visibleCount;
+            boolean textVisible = true;
+            for (ButtonDropTarget buttons : mDropTargets) {
+                if (buttons.getVisibility() != GONE) {
+                    textVisible = textVisible && !buttons.isTextTruncated(availableWidth);
+                }
             }
 
-            if (visibleView.getVisibility() == View.VISIBLE) {
-                if (shouldUpdateText) {
-                    result |= dropTarget.updateText(hideText);
-                } else if (dropTarget.isTextTruncated()) {
-                    result = true;
-                    break;
+            int widthSpec = MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST);
+            int heightSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
+            for (ButtonDropTarget button : mDropTargets) {
+                if (button.getVisibility() != GONE) {
+                    button.setTextVisible(textVisible);
+                    button.measure(widthSpec, heightSpec);
                 }
             }
         }
+        setMeasuredDimension(width, height);
+    }
 
-        return result;
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        if (mIsVertical) {
+            int gap = getResources().getDimensionPixelSize(R.dimen.drop_target_vertical_gap);
+            int start = gap;
+            int end;
+
+            for (ButtonDropTarget button : mDropTargets) {
+                if (button.getVisibility() != GONE) {
+                    end = start + button.getMeasuredHeight();
+                    button.layout(0, start, button.getMeasuredWidth(), end);
+                    start = end + gap;
+                }
+            }
+        } else {
+            int visibleCount = getVisibleButtonsCount();
+            int frameSize = (right - left) / visibleCount;
+
+            int start = frameSize / 2;
+            int halfWidth;
+            for (ButtonDropTarget button : mDropTargets) {
+                if (button.getVisibility() != GONE) {
+                    halfWidth = button.getMeasuredWidth() / 2;
+                    button.layout(start - halfWidth, 0,
+                            start + halfWidth, button.getMeasuredHeight());
+                    start = start + frameSize;
+                }
+            }
+        }
+    }
+
+    private int getVisibleButtonsCount() {
+        int visibleCount = 0;
+        for (ButtonDropTarget buttons : mDropTargets) {
+            if (buttons.getVisibility() != GONE) {
+                visibleCount++;
+            }
+        }
+        return visibleCount;
     }
 
     private void animateToVisibility(boolean isVisible) {
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 38a3044..32342b2 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -56,6 +56,7 @@
 import android.content.pm.PackageManager;
 import android.database.sqlite.SQLiteDatabase;
 import android.graphics.Point;
+import android.graphics.PointF;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.os.AsyncTask;
@@ -268,7 +269,7 @@
      */
     private PendingRequestArgs mPendingRequestArgs;
 
-    private float mLastDispatchTouchEventX = 0.0f;
+    private final PointF mLastDispatchTouchEvent = new PointF();
 
     public ViewGroupFocusHelper mFocusHandler;
     private boolean mRotationEnabled = false;
@@ -2013,7 +2014,7 @@
 
     @Override
     public boolean dispatchTouchEvent(MotionEvent ev) {
-        mLastDispatchTouchEventX = ev.getX();
+        mLastDispatchTouchEvent.set(ev.getX(), ev.getY());
         return super.dispatchTouchEvent(ev);
     }
 
@@ -2024,7 +2025,7 @@
         if (!isInState(NORMAL) && !isInState(OVERVIEW)) return false;
 
         boolean ignoreLongPressToOverview =
-                mDeviceProfile.shouldIgnoreLongPressToOverview(mLastDispatchTouchEventX);
+                mDeviceProfile.shouldIgnoreLongPressToOverview(mLastDispatchTouchEvent.x);
 
         if (v instanceof Workspace) {
             if (!isInState(OVERVIEW)) {
@@ -2032,7 +2033,7 @@
                     getUserEventDispatcher().logActionOnContainer(Action.Touch.LONGPRESS,
                             Action.Direction.NONE, ContainerType.WORKSPACE,
                             mWorkspace.getCurrentPage());
-                    UiFactory.onWorkspaceLongPress(this);
+                    UiFactory.onWorkspaceLongPress(this, mLastDispatchTouchEvent);
                     mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
                             HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
                     return true;
@@ -2069,7 +2070,7 @@
                     getUserEventDispatcher().logActionOnContainer(Action.Touch.LONGPRESS,
                             Action.Direction.NONE, ContainerType.WORKSPACE,
                             mWorkspace.getCurrentPage());
-                    UiFactory.onWorkspaceLongPress(this);
+                    UiFactory.onWorkspaceLongPress(this, mLastDispatchTouchEvent);
                 }
                 mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
                         HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index c946a44..e6aa6be 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -179,27 +179,6 @@
 
     private SpringLoadedDragController mSpringLoadedDragController;
 
-    // Direction used for moving the workspace and hotseat UI
-    public enum Direction {
-        X  (TRANSLATION_X),
-        Y  (TRANSLATION_Y);
-
-        private final Property<View, Float> viewProperty;
-
-        Direction(Property<View, Float> viewProperty) {
-            this.viewProperty = viewProperty;
-        }
-    }
-
-    private static final int HOTSEAT_STATE_ALPHA_INDEX = 2;
-
-    /**
-     * Hotseat alpha can be changed when moving horizontally, vertically, changing states.
-     * The values correspond to {@link Direction#X}, {@link Direction#Y} &
-     * {@link #HOTSEAT_STATE_ALPHA_INDEX} respectively.
-     */
-    private final float[] mHotseatAlpha = new float[] {1, 1, 1};
-
     private boolean mIsSwitchingState = false;
 
     boolean mChildrenLayersEnabled = true;
@@ -1206,81 +1185,8 @@
         // TODO(adamcohen): figure out a final effect here. We may need to recommend
         // different effects based on device performance. On at least one relatively high-end
         // device I've tried, translating the launcher causes things to get quite laggy.
-        setWorkspaceTranslationAndAlpha(transX, alpha);
-        setHotseatTranslationAndAlpha(Direction.X, transX, alpha);
-    }
-
-    /**
-     * Moves the workspace UI in the provided direction.
-     * @param translation the amount of horizontal shift.
-     * @param alpha the alpha for the workspace page
-     */
-    private void setWorkspaceTranslationAndAlpha(float translation, float alpha) {
-        float finalAlpha = alpha;
-
-        View currentChild = getChildAt(getCurrentPage());
-        if (currentChild != null) {
-            currentChild.setTranslationX(translation);
-            currentChild.setAlpha(finalAlpha);
-        }
-
-        // When the animation finishes, reset all pages, just in case we missed a page.
-        if (Float.compare(translation, 0) == 0) {
-            for (int i = getChildCount() - 1; i >= 0; i--) {
-                View child = getChildAt(i);
-                child.setTranslationX(0);
-                child.setAlpha(finalAlpha);
-            }
-        }
-    }
-
-    /**
-     * Moves the Hotseat UI in the provided direction.
-     * @param direction the direction to move the workspace
-     * @param translation the amount of shift.
-     * @param alpha the alpha for the hotseat page
-     */
-    public void setHotseatTranslationAndAlpha(Direction direction, float translation, float alpha) {
-        Property<View, Float> property = direction.viewProperty;
-        // Skip the page indicator movement in the vertical bar layout
-        if (direction != Direction.Y || !mLauncher.getDeviceProfile().isVerticalBarLayout()) {
-            property.set(mPageIndicator, translation);
-        }
-        property.set(mLauncher.getHotseat(), translation);
-        setHotseatAlphaAtIndex(alpha, direction.ordinal());
-    }
-
-    private void setHotseatAlphaAtIndex(float alpha, int index) {
-        mHotseatAlpha[index] = alpha;
-        final float hotseatAlpha = mHotseatAlpha[0] * mHotseatAlpha[1] * mHotseatAlpha[2];
-        final float pageIndicatorAlpha = mHotseatAlpha[0] * mHotseatAlpha[2];
-
-        mLauncher.getHotseat().setAlpha(hotseatAlpha);
-        mPageIndicator.setAlpha(pageIndicatorAlpha);
-    }
-
-    public ValueAnimator createHotseatAlphaAnimator(float finalValue) {
-        if (Float.compare(finalValue, mHotseatAlpha[HOTSEAT_STATE_ALPHA_INDEX]) == 0) {
-            // Return a dummy animator to avoid null checks.
-            return ValueAnimator.ofFloat(0, 0);
-        } else {
-            ValueAnimator animator = ValueAnimator
-                    .ofFloat(mHotseatAlpha[HOTSEAT_STATE_ALPHA_INDEX], finalValue);
-            animator.addUpdateListener(new AnimatorUpdateListener() {
-                @Override
-                public void onAnimationUpdate(ValueAnimator valueAnimator) {
-                    float value = (Float) valueAnimator.getAnimatedValue();
-                    setHotseatAlphaAtIndex(value, HOTSEAT_STATE_ALPHA_INDEX);
-                }
-            });
-
-            final boolean accessibilityEnabled = isAccessibilityEnabled(mLauncher);
-            animator.addUpdateListener(
-                    new AlphaUpdateListener(mLauncher.getHotseat(), accessibilityEnabled));
-            animator.addUpdateListener(
-                    new AlphaUpdateListener(mPageIndicator, accessibilityEnabled));
-            return animator;
-        }
+        mLauncher.getDragLayer().setTranslationX(transX);
+        mLauncher.getDragLayer().setAlpha(alpha);
     }
 
     @Override
diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
index cf35e52..21f5d67 100644
--- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
+++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
@@ -138,9 +138,8 @@
         propertySetter.setFloat(mWorkspace, View.TRANSLATION_Y,
                 scaleAndTranslation[2], Interpolators.ZOOM_IN);
 
-        float hotseatAlpha = state.getHoseatAlpha(mLauncher);
-        propertySetter.setViewAlpha(mWorkspace.createHotseatAlphaAnimator(hotseatAlpha),
-                mLauncher.getHotseat(), hotseatAlpha);
+        propertySetter.setViewAlpha(mLauncher.getHotseat(), state.getHoseatAlpha(mLauncher),
+                pageAlphaProvider.interpolator);
 
         // Set scrim
         propertySetter.setInt(mLauncher.getDragLayer().getScrim(), DRAWABLE_ALPHA,
@@ -165,11 +164,7 @@
 
     public static class PropertySetter {
 
-        public void setViewAlpha(Animator anim, View view, float alpha) {
-            if (anim != null) {
-                anim.end();
-                return;
-            }
+        public void setViewAlpha(View view, float alpha, TimeInterpolator interpolator) {
             view.setAlpha(alpha);
             AlphaUpdateListener.updateVisibility(view, isAccessibilityEnabled(view.getContext()));
         }
@@ -196,17 +191,14 @@
         }
 
         @Override
-        public void setViewAlpha(Animator anim, View view, float alpha) {
-            if (anim == null) {
-                if (view.getAlpha() == alpha) {
-                    return;
-                }
-                anim = ObjectAnimator.ofFloat(view, View.ALPHA, alpha);
-                anim.addListener(new AlphaUpdateListener(view,
-                        isAccessibilityEnabled(view.getContext())));
+        public void setViewAlpha(View view, float alpha, TimeInterpolator interpolator) {
+            if (view.getAlpha() == alpha) {
+                return;
             }
-
-            anim.setDuration(mDuration).setInterpolator(getFadeInterpolator(alpha));
+            ObjectAnimator anim = ObjectAnimator.ofFloat(view, View.ALPHA, alpha);
+            anim.addListener(new AlphaUpdateListener(
+                    view, isAccessibilityEnabled(view.getContext())));
+            anim.setDuration(mDuration).setInterpolator(interpolator);
             mStateAnimator.play(anim);
         }
 
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index d8a0d64..c02f2df 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -20,7 +20,6 @@
 import com.android.launcher3.Workspace;
 import com.android.launcher3.anim.AnimationSuccessListener;
 import com.android.launcher3.anim.AnimatorSetBuilder;
-import com.android.launcher3.anim.Interpolators;
 import com.android.launcher3.util.SystemUiController;
 import com.android.launcher3.util.Themes;
 import com.android.launcher3.views.AllAppsScrim;
@@ -52,8 +51,6 @@
         }
     };
 
-    private final Interpolator mHotseatAccelInterpolator = Interpolators.ACCEL_1_5;
-
     public static final float PARALLAX_COEFFICIENT = .125f;
 
     private AllAppsContainerView mAppsView;
@@ -111,7 +108,6 @@
 
         float workspaceHotseatAlpha = Utilities.boundToRange(progress, 0f, 1f);
         float alpha = 1 - workspaceHotseatAlpha;
-        float hotseatAlpha = mHotseatAccelInterpolator.getInterpolation(workspaceHotseatAlpha);
 
         mAppsView.setTranslationY(shiftCurrent);
         if (mAllAppsScrim == null) {
@@ -122,8 +118,8 @@
 
         if (!mIsVerticalLayout) {
             mAppsView.setAlpha(alpha);
-            mWorkspace.setHotseatTranslationAndAlpha(Workspace.Direction.Y, hotseatTranslation,
-                    hotseatAlpha);
+            mLauncher.getHotseat().setTranslationY(hotseatTranslation);
+            mLauncher.getWorkspace().getPageIndicator().setTranslationY(hotseatTranslation);
 
             // Use a light system UI (dark icons) if all apps is behind at least half of the
             // status bar.
diff --git a/src/com/android/launcher3/anim/RevealOutlineAnimation.java b/src/com/android/launcher3/anim/RevealOutlineAnimation.java
index c6b62fa..afb8875 100644
--- a/src/com/android/launcher3/anim/RevealOutlineAnimation.java
+++ b/src/com/android/launcher3/anim/RevealOutlineAnimation.java
@@ -80,4 +80,8 @@
     public float getRadius() {
         return mOutlineRadius;
     }
+
+    public void getOutline(Rect out) {
+        out.set(mOutline);
+    }
 }
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java
index 93a5679..677694f 100644
--- a/src/com/android/launcher3/dragndrop/DragLayer.java
+++ b/src/com/android/launcher3/dragndrop/DragLayer.java
@@ -366,6 +366,16 @@
     }
 
     @Override
+    public boolean dispatchTouchEvent(MotionEvent ev) {
+        ev.offsetLocation(getTranslationX(), 0);
+        try {
+            return super.dispatchTouchEvent(ev);
+        } finally {
+            ev.offsetLocation(-getTranslationX(), 0);
+        }
+    }
+
+    @Override
     public LayoutParams generateLayoutParams(AttributeSet attrs) {
         return new LayoutParams(getContext(), attrs);
     }
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index f90abb4..b3ef7bb 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -62,6 +62,7 @@
 import com.android.launcher3.Utilities;
 import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
 import com.android.launcher3.accessibility.ShortcutMenuAccessibilityDelegate;
+import com.android.launcher3.anim.RevealOutlineAnimation;
 import com.android.launcher3.anim.RoundedRectRevealOutlineProvider;
 import com.android.launcher3.badge.BadgeInfo;
 import com.android.launcher3.dragndrop.DragController;
@@ -810,10 +811,10 @@
             return;
         }
         mEndRect.setEmpty();
+        if (getOutlineProvider() instanceof RevealOutlineAnimation) {
+            ((RevealOutlineAnimation) getOutlineProvider()).getOutline(mEndRect);
+        }
         if (mOpenCloseAnimator != null) {
-            Outline outline = new Outline();
-            getOutlineProvider().getOutline(this, outline);
-            outline.getRect(mEndRect);
             mOpenCloseAnimator.cancel();
         }
         mIsOpen = false;
diff --git a/src/com/android/launcher3/util/TraceHelper.java b/src/com/android/launcher3/util/TraceHelper.java
index 0f3ac57..bde9c0a 100644
--- a/src/com/android/launcher3/util/TraceHelper.java
+++ b/src/com/android/launcher3/util/TraceHelper.java
@@ -55,7 +55,7 @@
     public static void partitionSection(String sectionName, String partition) {
         if (ENABLED) {
             MutableLong time = sUpTimes.get(sectionName);
-            if (time.value >= 0) {
+            if (time != null && time.value >= 0) {
 
                 if (SYSTEM_TRACE) {
                     Trace.endSection();
@@ -78,7 +78,7 @@
     public static void endSection(String sectionName, String msg) {
         if (ENABLED) {
             MutableLong time = sUpTimes.get(sectionName);
-            if (time.value >= 0) {
+            if (time != null && time.value >= 0) {
                 if (SYSTEM_TRACE) {
                     Trace.endSection();
                 }
diff --git a/src/com/android/launcher3/views/AllAppsScrim.java b/src/com/android/launcher3/views/AllAppsScrim.java
index 5d39adb..cc73182 100644
--- a/src/com/android/launcher3/views/AllAppsScrim.java
+++ b/src/com/android/launcher3/views/AllAppsScrim.java
@@ -46,6 +46,7 @@
     protected final WallpaperColorInfo mWallpaperColorInfo;
     private final Paint mFillPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
 
+    private final Rect mDrawRect = new Rect();
     private final Rect mPadding = new Rect();
     private final Rect mInsets = new Rect();
     private final DeviceProfile mGrid;
@@ -62,7 +63,7 @@
     private int mFillAlpha;
 
     private float mDrawHeight;
-    private float mTranslateY;
+    private float mDrawOffsetY;
 
     public AllAppsScrim(Context context) {
         this(context, null);
@@ -135,7 +136,7 @@
 
     @Override
     protected void onDraw(Canvas canvas) {
-        float edgeTop = getHeight() + mTranslateY - mDrawHeight + mPadding.top;
+        float edgeTop = getHeight() + mDrawOffsetY - mDrawHeight + mPadding.top;
         float edgeRight = getWidth() - mPadding.right;
 
         if (mPadding.left > 0 || mPadding.right > 0) {
@@ -153,12 +154,29 @@
     }
 
     public void setProgress(float translateY, float alpha) {
-        mFillAlpha = Math.round(alpha * mAlphaRange + mMinAlpha);
-        mFillPaint.setAlpha(mFillAlpha);
+        float newAlpha = Math.round(alpha * mAlphaRange + mMinAlpha);
+        // Negative translation means the scrim is moving up. For negative translation, we change
+        // draw offset as it requires redraw (since more area of the scrim needs to be shown). For
+        // position translation, we simply translate the scrim down as it avoids invalidate and
+        // hence could be optimized by the platform.
+        float drawOffsetY = Math.min(translateY, 0);
 
-        mTranslateY = translateY;
+        if (newAlpha != mFillAlpha || drawOffsetY != mDrawOffsetY) {
+            invalidateDrawRect();
 
-        invalidate();
+            mFillAlpha = Math.round(alpha * mAlphaRange + mMinAlpha);
+            mFillPaint.setAlpha(mFillAlpha);
+            mDrawOffsetY = drawOffsetY;
+            invalidateDrawRect();
+        }
+
+        setTranslationY(Math.max(translateY, 0));
+    }
+
+    private void invalidateDrawRect() {
+        mDrawRect.top = (int) (getHeight()
+                + mDrawOffsetY - mDrawHeight + mPadding.top - mShadowBlur - 0.5f);
+        invalidate(mDrawRect);
     }
 
     public void setDrawRegion(float height) {
@@ -178,6 +196,24 @@
             float scrimMargin = getResources().getDimension(R.dimen.all_apps_scrim_margin);
             setDrawRegion(mGrid.hotseatBarSizePx + insets.bottom + scrimMargin);
         }
+        updateDrawRect();
         invalidate();
     }
+
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        super.onLayout(changed, left, top, right, bottom);
+        updateDrawRect();
+    }
+
+    private void updateDrawRect() {
+        mDrawRect.bottom = getHeight();
+        if (mGrid.isVerticalBarLayout()) {
+            mDrawRect.left = (int) (mPadding.left - mShadowBlur - 0.5f);
+            mDrawRect.right = (int) (getWidth() - mPadding.right + 0.5f);
+        } else {
+            mDrawRect.left = 0;
+            mDrawRect.right = getWidth();
+        }
+    }
 }
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsState.java b/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsState.java
index 24236d8..fd33ee1 100644
--- a/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsState.java
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/AllAppsState.java
@@ -62,6 +62,11 @@
     }
 
     @Override
+    public float getHoseatAlpha(Launcher launcher) {
+        return 0;
+    }
+
+    @Override
     public View getFinalFocus(Launcher launcher) {
         return launcher.getAppsView();
     }
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/OverviewPanel.java b/src_ui_overrides/com/android/launcher3/uioverrides/OverviewPanel.java
index 9a09c97..2d39505 100644
--- a/src_ui_overrides/com/android/launcher3/uioverrides/OverviewPanel.java
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/OverviewPanel.java
@@ -37,6 +37,7 @@
 import com.android.launcher3.WorkspaceStateTransitionAnimation.AnimatedPropertySetter;
 import com.android.launcher3.WorkspaceStateTransitionAnimation.PropertySetter;
 import com.android.launcher3.anim.AnimatorSetBuilder;
+import com.android.launcher3.anim.Interpolators;
 import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
 import com.android.launcher3.userevent.nano.LauncherLogProto.ControlType;
 import com.android.launcher3.widget.WidgetsFullSheet;
@@ -173,8 +174,7 @@
     }
 
     private void setState(LauncherState state, PropertySetter setter) {
-        float hotseatAlpha = state.getHoseatAlpha(mLauncher);
-        setter.setViewAlpha(null, this, 1f - hotseatAlpha);
+        setter.setViewAlpha(this, 1f - state.getHoseatAlpha(mLauncher), Interpolators.ACCEL);
     }
 
     public static int getButtonBarHeight(Launcher launcher) {
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java
index 9819d71..0488fae 100644
--- a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java
@@ -21,6 +21,7 @@
 import android.app.ActivityOptions;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.PointF;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
@@ -54,7 +55,7 @@
                 launcher.getAllAppsController(), launcher.getWorkspace() };
     }
 
-    public static void onWorkspaceLongPress(Launcher launcher) {
+    public static void onWorkspaceLongPress(Launcher launcher, PointF touchPoint) {
         launcher.getStateManager().goToState(OVERVIEW);
     }
 
