Revert^2 "Change Overview Actions to round buttons."
f849f2856f3f70b36528a2198eab6cd96b40a3b4
Fix: 293081298
Change-Id: Iaf1553770329ec3a6c6d8a2d9d81b60203e79ed8
diff --git a/go/quickstep/res/drawable/ic_listen.xml b/go/quickstep/res/drawable/ic_listen.xml
index 16bb597..a226e49 100644
--- a/go/quickstep/res/drawable/ic_listen.xml
+++ b/go/quickstep/res/drawable/ic_listen.xml
@@ -19,6 +19,6 @@
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
- android:fillColor="@android:color/white"
+ android:fillColor="@color/overview_button"
android:pathData="M15.08,7.05c0.84,1.18 0.84,2.71 0,3.89l1.68,1.69c2.02,-2.02 2.02,-5.07 0,-7.27l-1.68,1.69zM20.07,2l-1.63,1.63c2.77,3.02 2.77,7.56 0,10.74L20.07,16c3.9,-3.89 3.91,-9.95 0,-14zM9,13c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM9,7c1.1,0 2,0.9 2,2s-0.9,2 -2,2 -2,-0.9 -2,-2 0.9,-2 2,-2zM9,14c-2.67,0 -8,1.34 -8,4v3h16v-3c0,-2.66 -5.33,-4 -8,-4zM15,19L3,19v-0.99C3.2,17.29 6.3,16 9,16s5.8,1.29 6,2v1z"/>
</vector>
diff --git a/go/quickstep/res/drawable/ic_search.xml b/go/quickstep/res/drawable/ic_search.xml
index ce290d9..33297cf 100644
--- a/go/quickstep/res/drawable/ic_search.xml
+++ b/go/quickstep/res/drawable/ic_search.xml
@@ -19,18 +19,18 @@
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
- android:fillColor="@android:color/white"
+ android:fillColor="@color/overview_button"
android:pathData="M16,3h-2v2h2c1.65,0 3,1.35 3,3v2h2V8C21,5.24 18.76,3 16,3z"/>
<path
- android:fillColor="@android:color/white"
+ android:fillColor="@color/overview_button"
android:pathData="M5,16v-2H3v2c0,2.76 2.24,5 5,5h2v-2H8C6.35,19 5,17.65 5,16z"/>
<path
- android:fillColor="@android:color/white"
+ android:fillColor="@color/overview_button"
android:pathData="M12,8.5c-1.93,0 -3.5,1.57 -3.5,3.5s1.57,3.5 3.5,3.5s3.5,-1.57 3.5,-3.5S13.93,8.5 12,8.5z"/>
<path
- android:fillColor="@android:color/white"
+ android:fillColor="@color/overview_button"
android:pathData="M18,18m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"/>
<path
- android:fillColor="@android:color/white"
+ android:fillColor="@color/overview_button"
android:pathData="M5,8c0,-1.65 1.35,-3 3,-3h2V3H8C5.24,3 3,5.24 3,8v2h2V8z"/>
</vector>
diff --git a/go/quickstep/res/drawable/ic_translate.xml b/go/quickstep/res/drawable/ic_translate.xml
index e3df56f..26e9ced 100644
--- a/go/quickstep/res/drawable/ic_translate.xml
+++ b/go/quickstep/res/drawable/ic_translate.xml
@@ -19,6 +19,6 @@
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
- android:fillColor="@android:color/white"
+ android:fillColor="@color/overview_button"
android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
</vector>
diff --git a/go/quickstep/res/layout/overview_actions_container.xml b/go/quickstep/res/layout/overview_actions_container.xml
index 48650aa..20bd937 100644
--- a/go/quickstep/res/layout/overview_actions_container.xml
+++ b/go/quickstep/res/layout/overview_actions_container.xml
@@ -23,8 +23,8 @@
<LinearLayout
android:id="@+id/action_buttons"
android:layout_width="match_parent"
- android:layout_height="@dimen/overview_actions_height"
- android:layout_gravity="top|center_horizontal"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom|center_horizontal"
android:orientation="horizontal">
<Space
@@ -104,13 +104,11 @@
</LinearLayout>
<!-- Unused. Included only for compatibility with parent class. -->
- <Button
+ <ImageButton
android:id="@+id/action_split"
style="@style/GoOverviewActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableStart="@drawable/ic_split_vertical"
- android:text="@string/action_split"
+ android:src="@drawable/ic_split_vertical"
+ android:contentDescription="@string/action_split"
android:theme="@style/ThemeControlHighlightWorkspaceColor"
android:visibility="gone" />
diff --git a/go/quickstep/res/values/dimens.xml b/go/quickstep/res/values/dimens.xml
index 84d7fe5..dda4c26 100644
--- a/go/quickstep/res/values/dimens.xml
+++ b/go/quickstep/res/values/dimens.xml
@@ -24,7 +24,7 @@
<dimen name="go_overview_button_container_width">80dp</dimen>
<dimen name="go_overview_button_container_margin">16dp</dimen>
<dimen name="go_overview_button_caption_margin">8dp</dimen>
- <dimen name="overview_actions_height">96dp</dimen>
+ <dimen name="overview_actions_size">96dp</dimen>
<dimen name="overview_proactive_row_height">0dp</dimen>
<dimen name="overview_proactive_row_bottom_margin">24dp</dimen>
<dimen name="task_corner_radius_override">28dp</dimen>
diff --git a/quickstep/res/drawable/ic_screenshot.xml b/quickstep/res/drawable/ic_screenshot.xml
index 9ee6c44..ea10661 100644
--- a/quickstep/res/drawable/ic_screenshot.xml
+++ b/quickstep/res/drawable/ic_screenshot.xml
@@ -1,32 +1,10 @@
-<!-- Copyright (C) 2020 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.
--->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="20dp"
- android:viewportWidth="20"
- android:viewportHeight="20">
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
<path
- android:pathData="M5.8334,1.666H8.3334V3.3327H5.8334V6.666H4.1667V3.3327C4.1667,2.4122 4.9129,1.666 5.8334,1.666Z"
- android:fillColor="#000000"/>
- <path
- android:pathData="M4.1667,13.3327V16.666C4.1667,17.5865 4.9129,18.3327 5.8334,18.3327H8.3334V16.666H5.8334V13.3327H4.1667Z"
- android:fillColor="#000000"/>
- <path
- android:pathData="M14.1667,13.3327V16.666H11.6667V18.3327H14.1667C15.0872,18.3327 15.8334,17.5865 15.8334,16.666V13.3327H14.1667Z"
- android:fillColor="#000000"/>
- <path
- android:pathData="M15.8334,6.666V3.3327C15.8334,2.4122 15.0872,1.666 14.1667,1.666H11.6667V3.3327H14.1667V6.666H15.8334Z"
- android:fillColor="#000000"/>
-</vector>
\ No newline at end of file
+ android:pathData="M5,4C5,2.343 6.343,1 8,1L16,1C17.657,1 19,2.343 19,4L19,20C19,21.657 17.657,23 16,23L8,23C6.343,23 5,21.657 5,20L5,4ZM8,3C7.448,3 7,3.448 7,4L7,20C7,20.552 7.448,21 8,21L16,21C16.552,21 17,20.552 17,20L17,4C17,3.448 16.552,3 16,3L8,3ZM8,4L8,8L9.5,8L9.5,5.5L12,5.5L12,4L8,4ZM16,16L16,20L12,20L12,18.5L14.5,18.5L14.5,16L16,16Z"
+ android:fillColor="@color/overview_button"
+ android:fillType="evenOdd"/>
+</vector>
diff --git a/quickstep/res/layout/fallback_recents_activity.xml b/quickstep/res/layout/fallback_recents_activity.xml
index bfeb82d..f0ea09c 100644
--- a/quickstep/res/layout/fallback_recents_activity.xml
+++ b/quickstep/res/layout/fallback_recents_activity.xml
@@ -15,6 +15,7 @@
-->
<com.android.launcher3.LauncherRootView
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
index 0fda0bf..2192a64 100644
--- a/quickstep/res/layout/overview_actions_container.xml
+++ b/quickstep/res/layout/overview_actions_container.xml
@@ -22,7 +22,7 @@
<LinearLayout
android:id="@+id/action_buttons"
android:layout_width="match_parent"
- android:layout_height="@dimen/overview_actions_height"
+ android:layout_height="@dimen/overview_actions_size"
android:layout_gravity="bottom|center_horizontal"
android:orientation="horizontal">
@@ -31,13 +31,14 @@
android:layout_height="1dp"
android:layout_weight="1" />
- <Button
+ <ImageButton
android:id="@+id/action_screenshot"
style="@style/OverviewActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableStart="@drawable/ic_screenshot"
- android:text="@string/action_screenshot"
+ android:layout_width="@dimen/overview_actions_size"
+ android:layout_height="@dimen/overview_actions_size"
+ android:gravity="center"
+ android:src="@drawable/ic_screenshot"
+ android:contentDescription="@string/action_screenshot"
android:theme="@style/ThemeControlHighlightWorkspaceColor" />
<Space
@@ -46,12 +47,14 @@
android:layout_height="1dp"
android:visibility="gone" />
- <Button
+ <ImageButton
android:id="@+id/action_split"
style="@style/OverviewActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/action_split"
+ android:layout_width="@dimen/overview_actions_size"
+ android:layout_height="@dimen/overview_actions_size"
+ android:gravity="center"
+ android:src="@drawable/ic_split_vertical"
+ android:contentDescription="@string/action_split"
android:theme="@style/ThemeControlHighlightWorkspaceColor"
android:visibility="gone" />
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index b0e91a1..88f1478 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -50,8 +50,10 @@
<!-- Overrideable in overlay that provides the Overview Actions. -->
<dimen name="overview_actions_top_margin">24dp</dimen>
- <dimen name="overview_actions_height">48dp</dimen>
+ <dimen name="overview_actions_size">60dp</dimen>
<dimen name="overview_actions_button_spacing">36dp</dimen>
+ <!-- 12dp + 156dp floating search pill width (note this is in addition to normal 36dp) -->
+ <dimen name="overview_actions_additional_floating_search_spacing">168dp</dimen>
<!-- These speeds are in dp/s -->
<dimen name="max_task_dismiss_drag_velocity">2.25dp</dimen>
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index fc03704..0c4e782 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -221,15 +221,10 @@
<item name="android:colorControlHighlight">?attr/workspaceTextColor</item>
</style>
- <style name="OverviewActionButton"
- parent="@android:style/Widget.DeviceDefault.Button.Borderless">
- <item name="android:paddingTop">4dp</item>
- <item name="android:paddingBottom">4dp</item>
- <item name="android:textColor">@color/overview_button</item>
+ <style name="OverviewActionButton" parent="@android:style/Widget.DeviceDefault.ImageButton">
+ <item name="android:background">@drawable/circle_btn_bg</item>
+ <item name="android:backgroundTint">?androidprv:attr/materialColorSurfaceBright</item>
<item name="android:drawableTint">@color/overview_button</item>
- <item name="android:tint">?android:attr/textColorPrimary</item>
- <item name="android:drawablePadding">8dp</item>
- <item name="android:textAllCaps">false</item>
</style>
<style name="OverviewClearAllButton" parent="@android:style/Widget.DeviceDefault.Button">
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
index 396d0ab..fecdd79 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
@@ -125,8 +125,33 @@
@Override
public int getFloatingSearchBarRestingMarginBottom(Launcher launcher) {
- return areElementsVisible(launcher, FLOATING_SEARCH_BAR) ? 0
- : super.getFloatingSearchBarRestingMarginBottom(launcher);
+ if (!areElementsVisible(launcher, FLOATING_SEARCH_BAR)) {
+ return super.getFloatingSearchBarRestingMarginBottom(launcher);
+ }
+ RecentsView recentsView = launcher.getOverviewPanel();
+ DeviceProfile dp = launcher.getDeviceProfile();
+ int activeTaskMarginBottom = LayoutUtils.getShelfTrackingDistance(launcher, dp,
+ recentsView.getPagedOrientationHandler());
+ // Center between task bottom and bottom of the screen.
+ return (activeTaskMarginBottom - dp.overviewActionsHeight) / 2
+ - launcher.getResources().getDimensionPixelSize(R.dimen.qsb_shadow_height);
+ }
+
+ @Override
+ public int getFloatingSearchBarRestingMarginStart(Launcher launcher) {
+ return getFloatingSearchBarRestingMarginHorizontal(launcher);
+ }
+
+ @Override
+ public int getFloatingSearchBarRestingMarginEnd(Launcher launcher) {
+ return getFloatingSearchBarRestingMarginHorizontal(launcher);
+ }
+
+ private static int getFloatingSearchBarRestingMarginHorizontal(Launcher launcher) {
+ // Width if the search bar were to be expanded (focused).
+ int expandedWidth = launcher.getResources().getDimensionPixelSize(
+ R.dimen.overview_floating_search_width);
+ return (launcher.getDeviceProfile().widthPx - expandedWidth) / 2;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index 80e5a54..5e488cc 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -20,6 +20,7 @@
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.CLEAR_ALL_BUTTON;
import static com.android.launcher3.LauncherState.EDIT_MODE;
+import static com.android.launcher3.LauncherState.FLOATING_SEARCH_BAR;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
@@ -99,6 +100,12 @@
}
@Override
+ public boolean isFloatingSearchVisible() {
+ return FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()
+ && OVERVIEW.areElementsVisible(mActivity, FLOATING_SEARCH_BAR);
+ }
+
+ @Override
protected void onTaskLaunchAnimationEnd(boolean success) {
if (success) {
mActivity.getStateManager().moveToRestState();
diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
index e47c089..754d1ff 100644
--- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
+++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
@@ -22,12 +22,14 @@
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
-import android.widget.Button;
import android.widget.FrameLayout;
+import android.widget.ImageButton;
import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
+import com.android.launcher3.BaseActivity;
+import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Insettable;
import com.android.launcher3.R;
@@ -49,6 +51,7 @@
implements OnClickListener, Insettable {
private final Rect mInsets = new Rect();
+ private BaseDraggingActivity mActivity;
@IntDef(flag = true, value = {
HIDDEN_NON_ZERO_ROTATION,
@@ -96,7 +99,7 @@
public static final int FLAG_SINGLE_TASK = 1 << 0;
private MultiValueAlpha mMultiValueAlpha;
- private Button mSplitButton;
+ private ImageButton mSplitButton;
@ActionsHiddenFlags
private int mHiddenFlags;
@@ -132,6 +135,8 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
+ mActivity = BaseActivity.fromContext(getContext());
+
mMultiValueAlpha = new MultiValueAlpha(findViewById(R.id.action_buttons), NUM_ALPHAS);
mMultiValueAlpha.setUpdateVisibility(true);
@@ -273,7 +278,7 @@
LayoutParams actionParams = (LayoutParams) findViewById(
R.id.action_buttons).getLayoutParams();
actionParams.setMargins(
- actionParams.leftMargin, mDp.overviewActionsTopMarginPx,
+ actionParams.leftMargin, 0,
actionParams.rightMargin, getBottomMargin());
}
@@ -286,6 +291,11 @@
return mDp.stashedTaskbarHeight;
}
+ if (isFloatingSearchVisible()) {
+ // Center between task and bottom of the screen.
+ return (mDp.heightPx - mTaskSize.bottom - mDp.overviewActionsHeight) / 2;
+ }
+
// Align to bottom of task Rect.
return mDp.heightPx - mTaskSize.bottom - mDp.overviewActionsTopMarginPx
- mDp.overviewActionsHeight;
@@ -301,9 +311,12 @@
requestLayout();
- mSplitButton.setCompoundDrawablesRelativeWithIntrinsicBounds(
- (dp.isLandscape ? R.drawable.ic_split_horizontal : R.drawable.ic_split_vertical),
- 0, 0, 0);
+ mSplitButton.setImageResource(
+ dp.isLandscape ? R.drawable.ic_split_horizontal : R.drawable.ic_split_vertical);
+ }
+
+ protected boolean isFloatingSearchVisible() {
+ return ((RecentsView) mActivity.getOverviewPanel()).isFloatingSearchVisible();
}
/**
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index a21bbe1..0071927 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -5220,6 +5220,11 @@
});
}
+ /** @return {@code true} if floating search bar is visible in Recents. */
+ public boolean isFloatingSearchVisible() {
+ return false;
+ }
+
public RemoteTargetHandle[] getRemoteTargetHandles() {
return mRemoteTargetHandles;
}
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml
index 1dd8da6..ccc042a 100644
--- a/res/color/overview_button.xml
+++ b/res/color/overview_button.xml
@@ -3,10 +3,10 @@
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<item
android:alpha="1"
- android:color="?androidprv:attr/materialColorOnSurface"
+ android:color="?androidprv:attr/materialColorOnSurfaceVariant"
android:state_enabled="true" />
<item
android:alpha="?android:disabledAlpha"
- android:color="?androidprv:attr/materialColorOnSurface"
+ android:color="?androidprv:attr/materialColorOnSurfaceVariant"
android:state_enabled="false" />
</selector>
\ No newline at end of file
diff --git a/res/drawable/circle_btn_bg.xml b/res/drawable/circle_btn_bg.xml
new file mode 100644
index 0000000..ad59ea5
--- /dev/null
+++ b/res/drawable/circle_btn_bg.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="@color/accent_ripple_color">
+ <item android:id="@android:id/mask">
+ <shape android:shape="oval">
+ <solid android:color="@android:color/white" />
+ </shape>
+ </item>
+ <item>
+ <shape android:shape="oval">
+ <solid android:color="@android:color/white" />
+ </shape>
+ </item>
+</ripple>
diff --git a/res/drawable/ic_split_horizontal.xml b/res/drawable/ic_split_horizontal.xml
index 2efd2b9..875b1be 100644
--- a/res/drawable/ic_split_horizontal.xml
+++ b/res/drawable/ic_split_horizontal.xml
@@ -5,5 +5,5 @@
android:viewportHeight="24">
<path
android:pathData="M4,6L9,6L9,18L4,18L4,6ZM2,6L2,18C2,19.1 2.9,20 4,20L9,20C10.1,20 11,19.1 11,18L11,6C11,4.9 10.1,4 9,4L4,4C2.9,4 2,4.9 2,6ZM15,6L20,6L20,18L15,18L15,6ZM13,6L13,18C13,19.1 13.9,20 15,20L20,20C21.1,20 22,19.1 22,18L22,6C22,4.9 21.1,4 20,4L15,4C13.9,4 13,4.9 13,6Z"
- android:fillColor="#000000"/>
+ android:fillColor="@color/overview_button"/>
</vector>
diff --git a/res/drawable/ic_split_vertical.xml b/res/drawable/ic_split_vertical.xml
index 9bc9785..e73a1b2 100644
--- a/res/drawable/ic_split_vertical.xml
+++ b/res/drawable/ic_split_vertical.xml
@@ -5,5 +5,5 @@
android:viewportHeight="24">
<path
android:pathData="M18,4V9H6V4H18ZM18,2H6C4.9,2 4,2.9 4,4V9C4,10.1 4.9,11 6,11H18C19.1,11 20,10.1 20,9V4C20,2.9 19.1,2 18,2ZM18,15V20H6V15H18ZM18,13H6C4.9,13 4,13.9 4,15V20C4,21.1 4.9,22 6,22H18C19.1,22 20,21.1 20,20V15C20,13.9 19.1,13 18,13Z"
- android:fillColor="#000000"/>
+ android:fillColor="@color/overview_button"/>
</vector>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 1079e00..bea86fa 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -396,10 +396,12 @@
<dimen name="task_thumbnail_icon_drawable_size">0dp</dimen>
<dimen name="task_thumbnail_icon_drawable_size_grid">0dp</dimen>
<dimen name="overview_task_margin">0dp</dimen>
- <dimen name="overview_actions_height">0dp</dimen>
+ <dimen name="overview_actions_size">0dp</dimen>
<dimen name="overview_actions_button_spacing">0dp</dimen>
<dimen name="overview_actions_margin_gesture">0dp</dimen>
<dimen name="overview_actions_top_margin">0dp</dimen>
+ <!-- Width if the search bar were to be full-size in Overview. Note pill is 192dp smaller. -->
+ <dimen name="overview_floating_search_width">348dp</dimen>
<dimen name="overview_grid_side_margin">0dp</dimen>
<dimen name="overview_grid_row_spacing">0dp</dimen>
<dimen name="overview_page_spacing">0dp</dimen>
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 42372f1..28e0cf2 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -584,13 +584,11 @@
overviewTaskIconDrawableSizeGridPx =
res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_drawable_size_grid);
overviewTaskThumbnailTopMarginPx = overviewTaskIconSizePx + overviewTaskMarginPx;
- // Don't add margin with floating search bar to minimize risk of overlapping.
- overviewActionsTopMarginPx = FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get() ? 0
- : res.getDimensionPixelSize(R.dimen.overview_actions_top_margin);
+ overviewActionsTopMarginPx = res.getDimensionPixelSize(R.dimen.overview_actions_top_margin);
overviewPageSpacing = res.getDimensionPixelSize(R.dimen.overview_page_spacing);
overviewActionsButtonSpacing = res.getDimensionPixelSize(
R.dimen.overview_actions_button_spacing);
- overviewActionsHeight = res.getDimensionPixelSize(R.dimen.overview_actions_height);
+ overviewActionsHeight = res.getDimensionPixelSize(R.dimen.overview_actions_size);
overviewRowSpacing = res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing);
overviewGridSideMargin = res.getDimensionPixelSize(R.dimen.overview_grid_side_margin);
diff --git a/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java b/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java
index d3d9de0..f3549e0 100644
--- a/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java
+++ b/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java
@@ -32,6 +32,8 @@
private static final String CONTENT = "DecorView|LinearLayout|FrameLayout:id/content|";
private static final String DRAG_LAYER =
CONTENT + "LauncherRootView:id/launcher|DragLayer:id/drag_layer|";
+ private static final String RECENTS_DRAG_LAYER =
+ CONTENT + "LauncherRootView:id/launcher|RecentsDragLayer:id/drag_layer|";
// Paths of nodes that are excluded from analysis.
private static final Collection<String> PATHS_TO_IGNORE = Set.of(
@@ -112,19 +114,27 @@
DRAG_LAYER + "WidgetsFullSheet|SpringRelativeLayout:id/container",
DRAG_LAYER + "WidgetsTwoPaneSheet|SpringRelativeLayout:id/container",
CONTENT + "LauncherRootView:id/launcher|FloatingIconView",
- CONTENT
- + "LauncherRootView|RecentsDragLayer:id/drag_layer|ArrowTipView|View:id/arrow",
- CONTENT
- + "LauncherRootView|RecentsDragLayer:id/drag_layer|FallbackRecentsView:id"
- + "/overview_panel",
- CONTENT
- + "LauncherRootView|RecentsDragLayer:id/drag_layer|NexusOverviewActionsView"
- + ":id/overview_actions_view|LinearLayout:id/action_buttons|Button:id"
- + "/action_screenshot",
- CONTENT
- + "LauncherRootView|RecentsDragLayer:id/drag_layer|NexusOverviewActionsView"
- + ":id/overview_actions_view|LinearLayout:id/action_buttons|Button:id"
- + "/action_select"
+ RECENTS_DRAG_LAYER + "ArrowTipView|View:id/arrow",
+ DRAG_LAYER + "FallbackRecentsView:id/overview_panel",
+ RECENTS_DRAG_LAYER + "FallbackRecentsView:id/overview_panel",
+ DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_screenshot",
+ RECENTS_DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_screenshot",
+ DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_select",
+ RECENTS_DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_select",
+ DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_split",
+ RECENTS_DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_split"
);
// Minimal increase or decrease of view's alpha between frames that triggers the error.
private static final float ALPHA_JUMP_THRESHOLD = 1f;