From 2851be8cba163c8abf36e82e748fa0cce225189c Mon Sep 17 00:00:00 2001 From: Schneider Victor-tulias Date: Thu, 16 Mar 2023 15:01:15 -0700 Subject: [PATCH] Add the gesture nav tutorial menu page - Added the gesture tutorial menu page (launched using an intent extra) - tutorial steps now launch the menu when complete if launched from the menu - the new default set of tutorial steps is home -> back -> overview. this is to handle the case where an intent is launched that is meant to launch the tutorial menu, but ENABLE_NEW_GESTURE_NAV_TUTORIAL is false Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL Bug: 274463555 Test: Ran the tutorial and menu on a large screen, foldable and phone Change-Id: I2eb5f658115be4d5ecb0233a8f09d22efe6ebadc --- .../gesture_tutorial_back_step_shape.xml | 23 +++ .../gesture_tutorial_home_step_shape.xml | 27 +++ .../gesture_tutorial_overview_step_shape.xml | 27 +++ .../gesture_tutorial_back_step_shape.xml | 23 +++ .../gesture_tutorial_home_step_shape.xml | 27 +++ .../gesture_tutorial_overview_step_shape.xml | 27 +++ .../gesture_tutorial_back_step_shape.xml | 27 +++ .../gesture_tutorial_home_step_shape.xml | 23 +++ ...esture_tutorial_menu_button_background.xml | 19 +++ .../gesture_tutorial_overview_step_shape.xml | 23 +++ .../gesture_tutorial_step_menu.xml | 157 +++++++++++++++++ .../res/layout/gesture_tutorial_step_menu.xml | 161 ++++++++++++++++++ quickstep/res/values-sw600dp-land/dimens.xml | 10 ++ quickstep/res/values-sw720dp-land/dimens.xml | 27 +++ quickstep/res/values/colors.xml | 7 +- quickstep/res/values/dimens.xml | 12 ++ quickstep/res/values/styles.xml | 7 + .../flags/DeveloperOptionsFragment.java | 52 +++--- .../AssistantGestureTutorialController.java | 6 +- .../AssistantGestureTutorialFragment.java | 4 +- .../BackGestureTutorialController.java | 4 +- .../BackGestureTutorialFragment.java | 8 +- .../interaction/GestureSandboxActivity.java | 92 +++++++--- .../interaction/GestureSandboxFragment.java | 41 +++++ .../HomeGestureTutorialController.java | 4 +- .../HomeGestureTutorialFragment.java | 8 +- .../quickstep/interaction/MenuFragment.java | 69 ++++++++ .../OverviewGestureTutorialController.java | 4 +- .../OverviewGestureTutorialFragment.java | 8 +- .../SandboxModeTutorialFragment.java | 4 +- .../interaction/TutorialController.java | 111 ++++++------ .../interaction/TutorialFragment.java | 64 ++++--- 32 files changed, 963 insertions(+), 143 deletions(-) create mode 100644 quickstep/res/drawable-sw600dp-land/gesture_tutorial_back_step_shape.xml create mode 100644 quickstep/res/drawable-sw600dp-land/gesture_tutorial_home_step_shape.xml create mode 100644 quickstep/res/drawable-sw600dp-land/gesture_tutorial_overview_step_shape.xml create mode 100644 quickstep/res/drawable-sw720dp-land/gesture_tutorial_back_step_shape.xml create mode 100644 quickstep/res/drawable-sw720dp-land/gesture_tutorial_home_step_shape.xml create mode 100644 quickstep/res/drawable-sw720dp-land/gesture_tutorial_overview_step_shape.xml create mode 100644 quickstep/res/drawable/gesture_tutorial_back_step_shape.xml create mode 100644 quickstep/res/drawable/gesture_tutorial_home_step_shape.xml create mode 100644 quickstep/res/drawable/gesture_tutorial_menu_button_background.xml create mode 100644 quickstep/res/drawable/gesture_tutorial_overview_step_shape.xml create mode 100644 quickstep/res/layout-sw600dp-land/gesture_tutorial_step_menu.xml create mode 100644 quickstep/res/layout/gesture_tutorial_step_menu.xml create mode 100644 quickstep/res/values-sw720dp-land/dimens.xml create mode 100644 quickstep/src/com/android/quickstep/interaction/GestureSandboxFragment.java create mode 100644 quickstep/src/com/android/quickstep/interaction/MenuFragment.java diff --git a/quickstep/res/drawable-sw600dp-land/gesture_tutorial_back_step_shape.xml b/quickstep/res/drawable-sw600dp-land/gesture_tutorial_back_step_shape.xml new file mode 100644 index 0000000000..0f2650b83f --- /dev/null +++ b/quickstep/res/drawable-sw600dp-land/gesture_tutorial_back_step_shape.xml @@ -0,0 +1,23 @@ + + + + diff --git a/quickstep/res/drawable-sw600dp-land/gesture_tutorial_home_step_shape.xml b/quickstep/res/drawable-sw600dp-land/gesture_tutorial_home_step_shape.xml new file mode 100644 index 0000000000..4cccd09bf5 --- /dev/null +++ b/quickstep/res/drawable-sw600dp-land/gesture_tutorial_home_step_shape.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/quickstep/res/drawable-sw600dp-land/gesture_tutorial_overview_step_shape.xml b/quickstep/res/drawable-sw600dp-land/gesture_tutorial_overview_step_shape.xml new file mode 100644 index 0000000000..7011f6c263 --- /dev/null +++ b/quickstep/res/drawable-sw600dp-land/gesture_tutorial_overview_step_shape.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/quickstep/res/drawable-sw720dp-land/gesture_tutorial_back_step_shape.xml b/quickstep/res/drawable-sw720dp-land/gesture_tutorial_back_step_shape.xml new file mode 100644 index 0000000000..02f6ff9e38 --- /dev/null +++ b/quickstep/res/drawable-sw720dp-land/gesture_tutorial_back_step_shape.xml @@ -0,0 +1,23 @@ + + + + diff --git a/quickstep/res/drawable-sw720dp-land/gesture_tutorial_home_step_shape.xml b/quickstep/res/drawable-sw720dp-land/gesture_tutorial_home_step_shape.xml new file mode 100644 index 0000000000..5becb8b0fe --- /dev/null +++ b/quickstep/res/drawable-sw720dp-land/gesture_tutorial_home_step_shape.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/quickstep/res/drawable-sw720dp-land/gesture_tutorial_overview_step_shape.xml b/quickstep/res/drawable-sw720dp-land/gesture_tutorial_overview_step_shape.xml new file mode 100644 index 0000000000..7143089d48 --- /dev/null +++ b/quickstep/res/drawable-sw720dp-land/gesture_tutorial_overview_step_shape.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/quickstep/res/drawable/gesture_tutorial_back_step_shape.xml b/quickstep/res/drawable/gesture_tutorial_back_step_shape.xml new file mode 100644 index 0000000000..68c5eb1fbd --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_back_step_shape.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/quickstep/res/drawable/gesture_tutorial_home_step_shape.xml b/quickstep/res/drawable/gesture_tutorial_home_step_shape.xml new file mode 100644 index 0000000000..698cba140b --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_home_step_shape.xml @@ -0,0 +1,23 @@ + + + + diff --git a/quickstep/res/drawable/gesture_tutorial_menu_button_background.xml b/quickstep/res/drawable/gesture_tutorial_menu_button_background.xml new file mode 100644 index 0000000000..1ab776bd6e --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_menu_button_background.xml @@ -0,0 +1,19 @@ + + + + diff --git a/quickstep/res/drawable/gesture_tutorial_overview_step_shape.xml b/quickstep/res/drawable/gesture_tutorial_overview_step_shape.xml new file mode 100644 index 0000000000..cc2c491ef3 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_overview_step_shape.xml @@ -0,0 +1,23 @@ + + + + diff --git a/quickstep/res/layout-sw600dp-land/gesture_tutorial_step_menu.xml b/quickstep/res/layout-sw600dp-land/gesture_tutorial_step_menu.xml new file mode 100644 index 0000000000..39c7e73d2d --- /dev/null +++ b/quickstep/res/layout-sw600dp-land/gesture_tutorial_step_menu.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +