From f98949cac3b3e355041cf99d0e47d9a5dd6895d4 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Thu, 22 Jun 2023 13:48:57 -0700 Subject: [PATCH] Change Overview Actions to round buttons. If floating search is active in Overview (flag enabled and we are the active Launcher), these buttons will be aligned to the search bar relative to the bottom of the screen. Otherwise, the buttons will be aligned below the active task like before. Demo for Launcher3 build: https://drive.google.com/file/d/1fVzRRnW5AFDMPkW-E8_w4BOCzTAOURQ_/view?usp=drive_link&resourcekey=0-6-EbFZXkBqcu0rw7uuEzjw Bug: 292000892 Test: Manual with floating enabled/disabled and SEPARATE_RECENTS_ACTIVITY enabled/disabled (simulating not being the active Launcher). Also tested with a 3P Launcher, Nova. Flag: N/A; this change is enabled by default, but also verified UI looks correct with ENABLE_FLOATING_SEARCH_BAR. Change-Id: Ia45f88d2c691c4525b1e73cca4707498d058a917 --- quickstep/res/drawable/ic_screenshot.xml | 38 ++++--------------- .../res/layout/fallback_recents_activity.xml | 1 + .../res/layout/overview_actions_container.xml | 23 ++++++----- quickstep/res/values/dimens.xml | 4 +- quickstep/res/values/styles.xml | 11 ++---- .../uioverrides/states/OverviewState.java | 29 +++++++++++++- .../quickstep/views/LauncherRecentsView.java | 7 ++++ .../quickstep/views/OverviewActionsView.java | 25 +++++++++--- .../android/quickstep/views/RecentsView.java | 5 +++ res/color/overview_button.xml | 4 +- res/drawable/circle_btn_bg.xml | 14 +++++++ res/drawable/ic_split_horizontal.xml | 2 +- res/drawable/ic_split_vertical.xml | 2 +- res/values/dimens.xml | 4 +- src/com/android/launcher3/DeviceProfile.java | 6 +-- .../AlphaJumpDetector.java | 33 ++++++++++------ 16 files changed, 131 insertions(+), 77 deletions(-) create mode 100644 res/drawable/circle_btn_bg.xml diff --git a/quickstep/res/drawable/ic_screenshot.xml b/quickstep/res/drawable/ic_screenshot.xml index 9ee6c44011..ea10661462 100644 --- a/quickstep/res/drawable/ic_screenshot.xml +++ b/quickstep/res/drawable/ic_screenshot.xml @@ -1,32 +1,10 @@ - + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> - - - - \ 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"/> + diff --git a/quickstep/res/layout/fallback_recents_activity.xml b/quickstep/res/layout/fallback_recents_activity.xml index bfeb82d9f9..f0ea09c1af 100644 --- a/quickstep/res/layout/fallback_recents_activity.xml +++ b/quickstep/res/layout/fallback_recents_activity.xml @@ -15,6 +15,7 @@ --> diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml index 0fda0bf8d4..2192a64653 100644 --- a/quickstep/res/layout/overview_actions_container.xml +++ b/quickstep/res/layout/overview_actions_container.xml @@ -22,7 +22,7 @@ @@ -31,13 +31,14 @@ android:layout_height="1dp" android:layout_weight="1" /> -