From 4cc0dbb5529ecca7fbcca911a6a6f9f347ecb653 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Tue, 27 Apr 2021 17:32:25 -0700 Subject: [PATCH] Change TaskIconMenu to lay out vertically Still lays out horizontally when in phone landscape. TODO(b/186583656), need to center view. Also have all layout be dynamic instead of having some cases be in XML and some in code. Bug: 181704764 Test: Task menu visible with all options in portrait/landscape tablet portrait phone fake/real landscape phone Change-Id: I3632eeb174f3e4baf2c9d69d51c1815c3c512e59 --- quickstep/res/layout/task_menu.xml | 12 ++++---- .../res/layout/task_view_menu_option.xml | 12 +++----- quickstep/res/values-land/dimens.xml | 2 -- quickstep/res/values-land/styles.xml | 28 ------------------- quickstep/res/values/dimens.xml | 2 +- quickstep/res/values/styles.xml | 10 ------- .../android/quickstep/views/TaskMenuView.java | 12 ++++---- src/com/android/launcher3/Utilities.java | 11 ++++++++ .../touch/LandscapePagedViewHandler.java | 11 ++++++-- .../touch/PagedOrientationHandler.java | 5 ++-- .../touch/PortraitPagedViewHandler.java | 28 ++++++++++++++++--- 11 files changed, 62 insertions(+), 71 deletions(-) delete mode 100644 quickstep/res/values-land/styles.xml diff --git a/quickstep/res/layout/task_menu.xml b/quickstep/res/layout/task_menu.xml index 3916ff9a1a..a219bca805 100644 --- a/quickstep/res/layout/task_menu.xml +++ b/quickstep/res/layout/task_menu.xml @@ -16,7 +16,7 @@ --> + android:layout_height="wrap_content" + android:orientation="horizontal" + android:divider="@drawable/all_apps_divider" + android:showDividers="beginning" /> \ 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 102ae9bc23..a7d6e89d8d 100644 --- a/quickstep/res/layout/task_view_menu_option.xml +++ b/quickstep/res/layout/task_view_menu_option.xml @@ -16,9 +16,8 @@ diff --git a/quickstep/res/values-land/dimens.xml b/quickstep/res/values-land/dimens.xml index 7cb01f6261..668aea2c9e 100644 --- a/quickstep/res/values-land/dimens.xml +++ b/quickstep/res/values-land/dimens.xml @@ -15,7 +15,5 @@ limitations under the License. --> - 24dp - 8dp \ No newline at end of file diff --git a/quickstep/res/values-land/styles.xml b/quickstep/res/values-land/styles.xml deleted file mode 100644 index 0824b4f555..0000000000 --- a/quickstep/res/values-land/styles.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index 99be50295d..9c0a083084 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -67,7 +67,7 @@ in various configurations --> 8dp 3dp - 0dp + 12dp 10dp diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml index 82a91a76f5..7c7d20a20a 100644 --- a/quickstep/res/values/styles.xml +++ b/quickstep/res/values/styles.xml @@ -15,16 +15,6 @@ limitations under the License. --> - - - - -