Loading quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml +8 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -77,4 +77,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> <View android:id="@+id/hotseat_icon_6" android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size" android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size" android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> </androidx.constraintlayout.widget.ConstraintLayout> No newline at end of file quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml +9 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -81,4 +82,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> <View android:id="@+id/hotseat_icon_6" android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size" android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size" android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> </androidx.constraintlayout.widget.ConstraintLayout> No newline at end of file quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml +9 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -81,4 +82,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> <View android:id="@+id/hotseat_icon_6" android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size" android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size" android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> </androidx.constraintlayout.widget.ConstraintLayout> No newline at end of file quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java +1 −1 Original line number Diff line number Diff line Loading @@ -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); }); Loading quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java +28 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading Loading @@ -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(); Loading @@ -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); Loading Loading @@ -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)); } Loading Loading @@ -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)); } Loading Loading
quickstep/res/layout-land/redesigned_gesture_tutorial_tablet_mock_hotseat.xml +8 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -77,4 +77,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> <View android:id="@+id/hotseat_icon_6" android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size" android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size" android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> </androidx.constraintlayout.widget.ConstraintLayout> No newline at end of file
quickstep/res/layout/redesigned_gesture_tutorial_foldable_mock_hotseat.xml +9 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -81,4 +82,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> <View android:id="@+id/hotseat_icon_6" android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size" android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size" android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> </androidx.constraintlayout.widget.ConstraintLayout> No newline at end of file
quickstep/res/layout/redesigned_gesture_tutorial_tablet_mock_hotseat.xml +9 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -81,4 +82,11 @@ android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> <View android:id="@+id/hotseat_icon_6" android:layout_width="@dimen/gesture_tutorial_hotseat_icon_size" android:layout_height="@dimen/gesture_tutorial_hotseat_icon_size" android:background="@drawable/redesigned_hotseat_icon" android:clipToOutline="true" /> </androidx.constraintlayout.widget.ConstraintLayout> No newline at end of file
quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java +1 −1 Original line number Diff line number Diff line Loading @@ -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); }); Loading
quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java +28 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading Loading @@ -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(); Loading @@ -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); Loading Loading @@ -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)); } Loading Loading @@ -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)); } Loading