From 2f3d412b243684b00288fdc51f345dc9be357e9e Mon Sep 17 00:00:00 2001 From: Saumya Prakash Date: Tue, 18 Apr 2023 23:55:13 +0000 Subject: [PATCH] Update the mock hotseat for the Gesture Navigation tutorial The redesigned gesture navigation tutorial was using older files for the mock hotseat when swiping up to home. This adds in the correct files to align with the design and be consistent with the mobile version of the tutorial. Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL Bug: 278790706 Test: Went through the gesture tutorial on small screen and large screen devices. Change-Id: Ib3cffd1b8b62220ff0b1458e32b3825396cdb6a0 --- ...designed_gesture_tutorial_mock_hotseat.xml | 39 ++++----- ...d_gesture_tutorial_tablet_mock_hotseat.xml | 80 ++++++++++++++++++ ...gesture_tutorial_foldable_mock_hotseat.xml | 84 +++++++++++++++++++ ...designed_gesture_tutorial_mock_hotseat.xml | 43 ++++------ ...d_gesture_tutorial_tablet_mock_hotseat.xml | 84 +++++++++++++++++++ .../interaction/TutorialController.java | 18 ++-- 6 files changed, 295 insertions(+), 53 deletions(-) create mode 100644 quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml create mode 100644 quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml create mode 100644 quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml diff --git a/quickstep/res/layout-land/redesigned_gesture_tutorial_mock_hotseat.xml b/quickstep/res/layout-land/redesigned_gesture_tutorial_mock_hotseat.xml index 6c08d14b6b..af86ae735d 100644 --- a/quickstep/res/layout-land/redesigned_gesture_tutorial_mock_hotseat.xml +++ b/quickstep/res/layout-land/redesigned_gesture_tutorial_mock_hotseat.xml @@ -22,49 +22,46 @@ android:paddingVertical="26dp" android:paddingHorizontal="56dp"> + + + android:clipToOutline="true" /> + android:clipToOutline="true" /> + android:clipToOutline="true" /> + android:clipToOutline="true" /> \ No newline at end of file diff --git a/quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml b/quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml new file mode 100644 index 0000000000..983c15b23b --- /dev/null +++ b/quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml b/quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml new file mode 100644 index 0000000000..b41eb8d570 --- /dev/null +++ b/quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/layout/redesigned_gesture_tutorial_mock_hotseat.xml b/quickstep/res/layout/redesigned_gesture_tutorial_mock_hotseat.xml index b1c8b31621..e93a0fca74 100644 --- a/quickstep/res/layout/redesigned_gesture_tutorial_mock_hotseat.xml +++ b/quickstep/res/layout/redesigned_gesture_tutorial_mock_hotseat.xml @@ -23,54 +23,45 @@ android:paddingStart="26dp" android:paddingEnd="26dp"> + + + android:clipToOutline="true" /> + android:clipToOutline="true" /> + android:clipToOutline="true" /> + android:clipToOutline="true" /> + app:layout_constraintTop_toBottomOf="@id/hotseat_flow" /> \ No newline at end of file diff --git a/quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml b/quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml new file mode 100644 index 0000000000..b41eb8d570 --- /dev/null +++ b/quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java index 6f50e3e4a5..67a0756646 100644 --- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java @@ -233,13 +233,19 @@ abstract class TutorialController implements BackGestureAttemptCallback, @LayoutRes protected int getMockHotseatResId() { - return mTutorialFragment.isLargeScreen() - ? (mTutorialFragment.isFoldable() + if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) { + return mTutorialFragment.isLargeScreen() + ? mTutorialFragment.isFoldable() + ? R.layout.redesigned_gesture_tutorial_foldable_mock_hotseat + : R.layout.redesigned_gesture_tutorial_tablet_mock_hotseat + : R.layout.redesigned_gesture_tutorial_mock_hotseat; + } else { + return mTutorialFragment.isLargeScreen() + ? mTutorialFragment.isFoldable() ? R.layout.gesture_tutorial_foldable_mock_hotseat - : R.layout.gesture_tutorial_tablet_mock_hotseat) - : (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get() - ? R.layout.redesigned_gesture_tutorial_mock_hotseat - : R.layout.gesture_tutorial_mock_hotseat); + : R.layout.gesture_tutorial_tablet_mock_hotseat + : R.layout.gesture_tutorial_mock_hotseat; + } } @LayoutRes