diff --git a/quickstep/res/drawable/task_menu_bg.xml b/quickstep/res/drawable/task_menu_bg.xml
index a60defc3bd..be1b387cfa 100644
--- a/quickstep/res/drawable/task_menu_bg.xml
+++ b/quickstep/res/drawable/task_menu_bg.xml
@@ -16,5 +16,6 @@
-->
-
+
+
diff --git a/quickstep/res/layout/task_menu.xml b/quickstep/res/layout/task_menu.xml
index a219bca805..96a94bacd5 100644
--- a/quickstep/res/layout/task_menu.xml
+++ b/quickstep/res/layout/task_menu.xml
@@ -20,18 +20,20 @@
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="@drawable/task_menu_bg"
- android:paddingBottom="@dimen/task_card_menu_shadow_height"
android:orientation="vertical"
android:visibility="invisible">
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:layout_marginBottom="2dp"
+ android:paddingTop="@dimen/task_card_menu_option_vertical_padding"
+ android:paddingBottom="@dimen/task_card_menu_option_vertical_padding"
+ android:textSize="24sp"/>
+ android:showDividers="middle" />
\ No newline at end of file
diff --git a/quickstep/res/layout/task_view_menu_option.xml b/quickstep/res/layout/task_view_menu_option.xml
index a7d6e89d8d..59c7263d37 100644
--- a/quickstep/res/layout/task_view_menu_option.xml
+++ b/quickstep/res/layout/task_view_menu_option.xml
@@ -21,7 +21,7 @@
android:orientation="vertical"
android:paddingTop="@dimen/task_card_menu_option_vertical_padding"
android:paddingBottom="@dimen/task_card_menu_option_vertical_padding"
- android:background="?android:attr/selectableItemBackground"
+ android:background="?android:attr/textColorPrimary"
android:theme="@style/PopupItem" >
+ android:backgroundTint="?android:attr/textColorPrimaryInverse"/>
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index 50453ace16..08f1503887 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -22,6 +22,8 @@
-1dp
+
+ 22dp
48dp
16dp
@@ -73,6 +75,7 @@
8dp
+ 8dp
3dp
12dp
-
-
+
+
\ No newline at end of file
diff --git a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
index 44e55e102c..11c9649279 100644
--- a/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
+++ b/src/com/android/launcher3/touch/LandscapePagedViewHandler.java
@@ -41,6 +41,7 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
+import com.android.launcher3.views.BaseDragLayer;
import java.util.Collections;
import java.util.List;
@@ -267,7 +268,7 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
}
@Override
- public void setTaskMenuLayoutOrientation(DeviceProfile deviceProfile,
+ public void setTaskOptionsMenuLayoutOrientation(DeviceProfile deviceProfile,
LinearLayout taskMenuLayout) {
taskMenuLayout.setOrientation(LinearLayout.HORIZONTAL);
}
@@ -284,6 +285,17 @@ public class LandscapePagedViewHandler implements PagedOrientationHandler {
Utilities.setStartMarginForView(viewGroup.findViewById(R.id.icon), 0);
}
+ @Override
+ public void setTaskMenuAroundTaskView(LinearLayout taskView, float margin) {
+ BaseDragLayer.LayoutParams lp = (BaseDragLayer.LayoutParams) taskView.getLayoutParams();
+ lp.topMargin += margin;
+ }
+
+ @Override
+ public PointF getAdditionalInsetForTaskMenu(float margin) {
+ return new PointF(margin, 0);
+ }
+
/* ---------- The following are only used by TaskViewTouchHandler. ---------- */
@Override
diff --git a/src/com/android/launcher3/touch/PagedOrientationHandler.java b/src/com/android/launcher3/touch/PagedOrientationHandler.java
index 6811438c6a..e0b89c7ffe 100644
--- a/src/com/android/launcher3/touch/PagedOrientationHandler.java
+++ b/src/com/android/launcher3/touch/PagedOrientationHandler.java
@@ -109,16 +109,37 @@ public interface PagedOrientationHandler {
float getSecondaryValue(float x, float y);
boolean isLayoutNaturalToLauncher();
+ FloatProperty getSplitSelectTaskOffset(FloatProperty primary, FloatProperty secondary,
+ DeviceProfile deviceProfile);
+ int getDistanceToBottomOfRect(DeviceProfile dp, Rect rect);
+ List getSplitPositionOptions(DeviceProfile dp);
+
+ // Overview TaskMenuView methods
float getTaskMenuX(float x, View thumbnailView, int overScroll);
float getTaskMenuY(float y, View thumbnailView, int overScroll);
int getTaskMenuWidth(View view);
- void setTaskMenuLayoutOrientation(DeviceProfile deviceProfile, LinearLayout taskMenuLayout);
+ /**
+ * Sets linear layout orientation for {@link com.android.launcher3.popup.SystemShortcut} items
+ * inside task menu view.
+ */
+ void setTaskOptionsMenuLayoutOrientation(DeviceProfile deviceProfile,
+ LinearLayout taskMenuLayout);
+ /**
+ * Sets layout param attributes for {@link com.android.launcher3.popup.SystemShortcut} child
+ * views inside task menu view.
+ */
void setLayoutParamsForTaskMenuOptionItem(LinearLayout.LayoutParams lp,
LinearLayout viewGroup, DeviceProfile deviceProfile);
- int getDistanceToBottomOfRect(DeviceProfile dp, Rect rect);
- List getSplitPositionOptions(DeviceProfile dp);
- FloatProperty getSplitSelectTaskOffset(FloatProperty primary, FloatProperty secondary,
- DeviceProfile deviceProfile);
+ /**
+ * Adjusts margins for the entire task menu view itself, which comprises of both app title and
+ * shortcut options.
+ */
+ void setTaskMenuAroundTaskView(LinearLayout taskView, float margin);
+ /**
+ * Since the task menu layout is manually positioned on top of recents view, this method returns
+ * additional adjustments to the positioning based on fake land/seascape
+ */
+ PointF getAdditionalInsetForTaskMenu(float margin);
// The following are only used by TaskViewTouchHandler.
/** @return Either VERTICAL or HORIZONTAL. */
diff --git a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
index d3d77fd99a..dcbb7ca6e8 100644
--- a/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
+++ b/src/com/android/launcher3/touch/PortraitPagedViewHandler.java
@@ -39,6 +39,7 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
+import com.android.launcher3.views.BaseDragLayer;
import java.util.ArrayList;
import java.util.List;
@@ -272,7 +273,7 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
}
@Override
- public void setTaskMenuLayoutOrientation(DeviceProfile deviceProfile,
+ public void setTaskOptionsMenuLayoutOrientation(DeviceProfile deviceProfile,
LinearLayout taskMenuLayout) {
if (deviceProfile.isLandscape && !deviceProfile.isTablet) {
// Phone landscape
@@ -302,6 +303,18 @@ public class PortraitPagedViewHandler implements PagedOrientationHandler {
lp.height = LinearLayout.LayoutParams.WRAP_CONTENT;
}
+ @Override
+ public void setTaskMenuAroundTaskView(LinearLayout taskView, float margin) {
+ BaseDragLayer.LayoutParams lp = (BaseDragLayer.LayoutParams) taskView.getLayoutParams();
+ lp.topMargin += margin;
+ lp.leftMargin += margin;
+ }
+
+ @Override
+ public PointF getAdditionalInsetForTaskMenu(float margin) {
+ return new PointF(0, 0);
+ }
+
/* ---------- The following are only used by TaskViewTouchHandler. ---------- */
@Override
diff --git a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
index 893a274e9e..91d44bd29c 100644
--- a/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
+++ b/src/com/android/launcher3/touch/SeascapePagedViewHandler.java
@@ -26,11 +26,13 @@ import android.graphics.PointF;
import android.graphics.Rect;
import android.view.Surface;
import android.view.View;
+import android.widget.LinearLayout;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
+import com.android.launcher3.views.BaseDragLayer;
import java.util.Collections;
import java.util.List;
@@ -88,6 +90,17 @@ public class SeascapePagedViewHandler extends LandscapePagedViewHandler {
return y + thumbnailView.getMeasuredHeight() + overScroll;
}
+ @Override
+ public void setTaskMenuAroundTaskView(LinearLayout taskView, float margin) {
+ BaseDragLayer.LayoutParams lp = (BaseDragLayer.LayoutParams) taskView.getLayoutParams();
+ lp.bottomMargin += margin;
+ }
+
+ @Override
+ public PointF getAdditionalInsetForTaskMenu(float margin) {
+ return new PointF(-margin, margin);
+ }
+
@Override
public int getDistanceToBottomOfRect(DeviceProfile dp, Rect rect) {
return dp.widthPx - rect.right;