Merge "Update the colors for gesture navigation tutorial." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
71d05f963f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -43,14 +43,15 @@
|
||||
<color name="gesture_tutorial_taskbar_color">#E8EAED</color>
|
||||
|
||||
<!-- Redesigned gesture navigation tutorial -->
|
||||
<color name="gesture_home_tutorial_background">#FFAD91</color>
|
||||
<color name="gesture_home_tutorial_swipe_up_rect">#3857C7</color>
|
||||
<color name="gesture_back_tutorial_exiting_app">#F9A2B9</color>
|
||||
<color name="gesture_back_tutorial_background">#3857C7</color>
|
||||
<color name="gesture_overview_tutorial_background">#DFF3AF</color>
|
||||
<color name="gesture_overview_tutorial_swipe_rect">#7E44AD</color>
|
||||
<color name="gesture_overview_background">#BFC8CB</color>
|
||||
<color name="gesture_tutorial_menu_background">#1C1B1F</color>
|
||||
<color name="gesture_home_tutorial_background">#FFAD91</color> <!-- Light Orange -->
|
||||
<color name="gesture_tutorial_workspace_background">#4B64AE</color> <!-- Indigo Blue -->
|
||||
<color name="gesture_home_tutorial_arrow">#DBF59E</color> <!-- Lime Green -->
|
||||
<color name="gesture_back_tutorial_exiting_app">#F9A2B9</color> <!-- Pink -->
|
||||
<color name="gesture_back_tutorial_instructional_shape">#217500</color> <!-- Green -->
|
||||
<color name="gesture_overview_tutorial_background">#DFF3AF</color> <!-- Light Green -->
|
||||
<color name="gesture_overview_tutorial_swipe_rect">#7E44AD</color> <!-- Purple -->
|
||||
<color name="gesture_overview_background">#CABCD6</color> <!-- Light Purple -->
|
||||
<color name="gesture_tutorial_menu_background">#1C1B1F</color> <!-- Black -->
|
||||
|
||||
<!-- Mock hotseat -->
|
||||
<color name="mock_app_icon">#BDC1C6</color>
|
||||
|
||||
@@ -96,7 +96,7 @@ final class BackGestureTutorialController extends TutorialController {
|
||||
|
||||
@Override
|
||||
protected int getSwipeActionColorResId() {
|
||||
return R.color.gesture_back_tutorial_background;
|
||||
return R.color.gesture_tutorial_workspace_background;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,6 +24,9 @@ import android.os.Build;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.quickstep.interaction.EdgeBackGestureHandler.BackGestureResult;
|
||||
import com.android.quickstep.interaction.NavBarGestureHandler.NavBarGestureResult;
|
||||
import com.android.quickstep.util.LottieAnimationColorUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/** A {@link TutorialController} for the Home tutorial. */
|
||||
@TargetApi(Build.VERSION_CODES.R)
|
||||
@@ -31,6 +34,14 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll
|
||||
|
||||
HomeGestureTutorialController(HomeGestureTutorialFragment fragment, TutorialType tutorialType) {
|
||||
super(fragment, tutorialType);
|
||||
if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
|
||||
LottieAnimationColorUtils.updateColors(
|
||||
mAnimatedGestureDemonstration,
|
||||
Map.of(".onSurfaceHome", R.color.gesture_tutorial_workspace_background,
|
||||
".surfaceHome", R.color.gesture_home_tutorial_background,
|
||||
".arrow", R.color.gesture_home_tutorial_arrow),
|
||||
mContext.getTheme());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,7 +90,7 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll
|
||||
|
||||
@Override
|
||||
protected int getSwipeActionColorResId() {
|
||||
return R.color.gesture_home_tutorial_swipe_up_rect;
|
||||
return R.color.gesture_tutorial_workspace_background;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -89,14 +89,14 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont
|
||||
|
||||
@Override
|
||||
protected int getSwipeActionColorResId() {
|
||||
return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
|
||||
? R.color.gesture_overview_background
|
||||
: R.color.gesture_overview_tutorial_swipe_rect;
|
||||
return R.color.gesture_overview_background;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getMockPreviousAppTaskThumbnailColorResId() {
|
||||
return R.color.gesture_overview_tutorial_swipe_rect;
|
||||
return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
|
||||
? R.color.gesture_overview_tutorial_swipe_rect
|
||||
: R.color.gesture_tutorial_fake_previous_task_view_color;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -118,7 +118,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
|
||||
private final AlertDialog mSkipTutorialDialog;
|
||||
|
||||
private boolean mGestureCompleted = false;
|
||||
private LottieAnimationView mAnimatedGestureDemonstration;
|
||||
protected LottieAnimationView mAnimatedGestureDemonstration;
|
||||
private LottieAnimationView mCheckmarkAnimation;
|
||||
private RelativeLayout mFullGestureDemonstration;
|
||||
|
||||
@@ -553,7 +553,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
|
||||
protected void resetViewsForBackGesture() {
|
||||
mFakeTaskView.setVisibility(View.VISIBLE);
|
||||
mFakeTaskView.setBackgroundColor(
|
||||
mContext.getColor(R.color.gesture_back_tutorial_background));
|
||||
mContext.getColor(R.color.gesture_tutorial_workspace_background));
|
||||
mExitingAppView.setVisibility(View.VISIBLE);
|
||||
|
||||
// reset the exiting app's dimensions
|
||||
|
||||
Reference in New Issue
Block a user