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 index 850f6e3c5a..4f1fabe538 100644 --- a/quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml +++ b/quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml @@ -28,7 +28,7 @@ android:layout_height="wrap_content" app:constraint_referenced_ids="hotseat_search_bar, hotseat_icon_1, hotseat_icon_2, - hotseat_icon_3, hotseat_icon_4, hotseat_icon_5" + hotseat_icon_3, hotseat_icon_4, hotseat_icon_5, hotseat_icon_6" app:flow_horizontalStyle="spread" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -77,4 +77,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> + + \ 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 index 821628ac62..154ca1af62 100644 --- a/quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml +++ b/quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml @@ -40,7 +40,8 @@ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin" app:constraint_referenced_ids= - "hotseat_icon_1, hotseat_icon_2, hotseat_icon_3, hotseat_icon_4, hotseat_icon_5" + "hotseat_icon_1, hotseat_icon_2, hotseat_icon_3, hotseat_icon_4, hotseat_icon_5, + hotseat_icon_6" app:flow_horizontalStyle="spread_inside" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -81,4 +82,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> + + \ 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 index 821628ac62..154ca1af62 100644 --- a/quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml +++ b/quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml @@ -40,7 +40,8 @@ android:layout_marginTop="@dimen/gesture_tutorial_hotseat_icon_search_margin" app:constraint_referenced_ids= - "hotseat_icon_1, hotseat_icon_2, hotseat_icon_3, hotseat_icon_4, hotseat_icon_5" + "hotseat_icon_1, hotseat_icon_2, hotseat_icon_3, hotseat_icon_4, hotseat_icon_5, + hotseat_icon_6" app:flow_horizontalStyle="spread_inside" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -81,4 +82,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> + + \ No newline at end of file diff --git a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java index bce8b985af..0aa80d3e79 100644 --- a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java @@ -192,7 +192,7 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll showFeedback(R.string.home_gesture_feedback_swipe_too_far_from_edge); break; case OVERVIEW_GESTURE_COMPLETED: - fadeOutFakeTaskView(true, () -> { + fadeOutFakeTaskView(false, () -> { showFeedback(R.string.home_gesture_feedback_overview_detected); showFakeTaskbar(/* animateFromHotseat= */ false); }); diff --git a/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java index f1cbfcc613..558d5dc238 100644 --- a/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java @@ -15,6 +15,9 @@ */ package com.android.quickstep.interaction; +import static android.view.View.INVISIBLE; +import static android.view.View.VISIBLE; + import static com.android.launcher3.anim.Interpolators.ACCEL; import static com.android.launcher3.util.window.RefreshRateTracker.getSingleFrameMs; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; @@ -38,6 +41,7 @@ import android.view.ViewOutlineProvider; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.core.graphics.ColorUtils; import com.android.launcher3.DeviceProfile; import com.android.launcher3.InvariantDeviceProfile; @@ -46,6 +50,7 @@ import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.anim.AnimatorListeners; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PendingAnimation; +import com.android.launcher3.config.FeatureFlags; import com.android.quickstep.GestureState; import com.android.quickstep.OverviewComponentObserver; import com.android.quickstep.RecentsAnimationDeviceState; @@ -125,6 +130,9 @@ abstract class SwipeUpGestureTutorialController extends TutorialController { void resetTaskViews() { mFakeHotseatView.setVisibility(View.INVISIBLE); mFakeIconView.setVisibility(View.INVISIBLE); + if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) { + mFakeIconView.getBackground().setTint(getFakeTaskViewColor()); + } if (mTutorialFragment.getActivity() != null) { int height = mTutorialFragment.getRootView().getFullscreenHeight(); int width = mTutorialFragment.getRootView().getWidth(); @@ -133,6 +141,9 @@ abstract class SwipeUpGestureTutorialController extends TutorialController { mFakeTaskViewRadius = 0; mFakeTaskView.invalidateOutline(); mFakeTaskView.setVisibility(View.VISIBLE); + if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) { + mFakeTaskView.setBackgroundColor(getFakeTaskViewColor()); + } mFakeTaskView.setAlpha(1); mFakePreviousTaskView.setVisibility(View.INVISIBLE); mFakePreviousTaskView.setAlpha(1); @@ -250,6 +261,17 @@ abstract class SwipeUpGestureTutorialController extends TutorialController { // After home animation finishes, fade out and run onEndRunnable. PendingAnimation fadeAnim = new PendingAnimation(300); fadeAnim.setViewAlpha(mFakeIconView, 0, ACCEL); + final View hotseatIconView = mHotseatIconView; + if (hotseatIconView != null) { + hotseatIconView.setVisibility(INVISIBLE); + fadeAnim.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationStart(Animator animation) { + super.onAnimationStart(animation); + hotseatIconView.setVisibility(VISIBLE); + } + }); + } if (onEndRunnable != null) { fadeAnim.addListener(AnimatorListeners.forSuccessCallback(onEndRunnable)); } @@ -371,6 +393,12 @@ abstract class SwipeUpGestureTutorialController extends TutorialController { false, /* isOpening */ mFakeIconView, mDp); mFakeIconView.setAlpha(1); + if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) { + int iconColor = ColorUtils.blendARGB( + getFakeTaskViewColor(), getHotseatIconColor(), progress); + mFakeIconView.getBackground().setTint(iconColor); + mFakeTaskView.setBackgroundColor(iconColor); + } mFakeTaskView.setAlpha(getWindowAlpha(progress)); mFakePreviousTaskView.setAlpha(getWindowAlpha(progress)); } diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java index 16fe2d3d4d..4a1fec3ecf 100644 --- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java @@ -742,11 +742,12 @@ abstract class TutorialController implements BackGestureAttemptCallback, if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) { mExitingAppView.setBackgroundColor(getExitingAppColor()); mFakeTaskView.setBackgroundColor(getFakeTaskViewColor()); - updateHotseatChildViewColor(mFakeIconView); + updateHotseatChildViewColor(mHotseatIconView); updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_2)); updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_3)); updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_4)); updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_5)); + updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_6)); updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_search_bar)); } else { updateFakeViewLayout(mFakeTaskView, getMockAppTaskLayoutResId());