diff --git a/quickstep/res/drawable/gesture_tutorial_back_left.xml b/quickstep/res/drawable/gesture_tutorial_back_left.xml deleted file mode 100644 index 92ae2025fb..0000000000 --- a/quickstep/res/drawable/gesture_tutorial_back_left.xml +++ /dev/null @@ -1,559 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_back_right.xml b/quickstep/res/drawable/gesture_tutorial_back_right.xml deleted file mode 100644 index 77d9924524..0000000000 --- a/quickstep/res/drawable/gesture_tutorial_back_right.xml +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_home.xml b/quickstep/res/drawable/gesture_tutorial_home.xml deleted file mode 100644 index e77eb7401f..0000000000 --- a/quickstep/res/drawable/gesture_tutorial_home.xml +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml b/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml new file mode 100644 index 0000000000..8bf305cd15 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml b/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml new file mode 100644 index 0000000000..812c54c9e2 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_bottom_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_bottom_edge.xml new file mode 100644 index 0000000000..3efb52d16f --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_bottom_edge.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_back_right.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_back_right.xml new file mode 100644 index 0000000000..c41d077218 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_gesture_back_right.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_home.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_home.xml new file mode 100644 index 0000000000..c5dd41b520 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_gesture_home.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_left_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_left_edge.xml new file mode 100644 index 0000000000..c41d077218 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_gesture_left_edge.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_gesture_overview.xml b/quickstep/res/drawable/gesture_tutorial_loop_gesture_overview.xml new file mode 100644 index 0000000000..5d87805e3c --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_gesture_overview.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_home.xml b/quickstep/res/drawable/gesture_tutorial_loop_home.xml new file mode 100644 index 0000000000..ed072a9526 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_home.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_left_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_left_edge.xml new file mode 100644 index 0000000000..07caaea042 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_left_edge.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_overview.xml b/quickstep/res/drawable/gesture_tutorial_loop_overview.xml new file mode 100644 index 0000000000..acf0c4c9d0 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_overview.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_loop_right_edge.xml b/quickstep/res/drawable/gesture_tutorial_loop_right_edge.xml new file mode 100644 index 0000000000..d86b653e50 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_loop_right_edge.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_motion_back_left.xml b/quickstep/res/drawable/gesture_tutorial_motion_back_left.xml new file mode 100644 index 0000000000..e944c0e919 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_motion_back_left.xml @@ -0,0 +1,1412 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml b/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml new file mode 100644 index 0000000000..f8d649abb2 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_motion_home.xml b/quickstep/res/drawable/gesture_tutorial_motion_home.xml new file mode 100644 index 0000000000..9dbaee6247 --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_motion_home.xml @@ -0,0 +1,1254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_motion_overview.xml b/quickstep/res/drawable/gesture_tutorial_motion_overview.xml new file mode 100644 index 0000000000..4751fa9e2b --- /dev/null +++ b/quickstep/res/drawable/gesture_tutorial_motion_overview.xml @@ -0,0 +1,1623 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/gesture_tutorial_overview.xml b/quickstep/res/drawable/gesture_tutorial_overview.xml deleted file mode 100644 index c4ca72f5a1..0000000000 --- a/quickstep/res/drawable/gesture_tutorial_overview.xml +++ /dev/null @@ -1,823 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/quickstep/res/drawable/mock_conversation.xml b/quickstep/res/drawable/mock_conversation.xml new file mode 100644 index 0000000000..272d9ed8a8 --- /dev/null +++ b/quickstep/res/drawable/mock_conversation.xml @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/mock_conversations_list.xml b/quickstep/res/drawable/mock_conversations_list.xml new file mode 100644 index 0000000000..2dbc88f0bf --- /dev/null +++ b/quickstep/res/drawable/mock_conversations_list.xml @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/mock_webpage.xml b/quickstep/res/drawable/mock_webpage.xml new file mode 100644 index 0000000000..93b22b7d31 --- /dev/null +++ b/quickstep/res/drawable/mock_webpage.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quickstep/res/drawable/sandbox_fake_google_search.xml b/quickstep/res/drawable/sandbox_fake_google_search.xml deleted file mode 100644 index f06b92784c..0000000000 --- a/quickstep/res/drawable/sandbox_fake_google_search.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/quickstep/res/layout/gesture_tutorial_fragment.xml b/quickstep/res/layout/gesture_tutorial_fragment.xml index 700dd1f9f5..5f827309d9 100644 --- a/quickstep/res/layout/gesture_tutorial_fragment.xml +++ b/quickstep/res/layout/gesture_tutorial_fragment.xml @@ -65,6 +65,17 @@ android:scaleType="fitXY" android:visibility="gone"/> + + Make sure you swipe from the far-left edge. Make sure you swipe from the left edge to the middle of the screen and let go. - - That\'s it! Now try swiping from the right edge. + + Nice! Now swipe from the right to go back + + You can also go back to the last screen by swiping from the right edge to the middle of the screen. Make sure you swipe from the far-right edge. Make sure you swipe from the right edge to the middle of the screen and let go. - - You completed the go back gesture. Next up, learn how to go Home. + + You completed the go back gesture. Next up, learn how to switch apps. + + You completed the go back gesture. Make sure you don\'t swipe too close to the bottom of the screen. To change the sensitivity of the back gesture, go to Settings - Swipe to go back + Swipe from the left to go back - To go back to the last screen, swipe from the left or right edge to the middle of the screen. + To go back to the last screen you were on, swipe from the left edge to the middle of the screen. Make sure you swipe up from the bottom edge of the screen. Make sure you don\'t pause before letting go. Make sure you swipe straight up. - You completed the go Home gesture. Next up, learn how to switch apps. + + You completed the go Home gesture. Next up, learn how to go back. + + You completed the go Home gesture. Swipe to go home @@ -130,7 +137,10 @@ Try holding the window for longer before releasing. Make sure you swipe straight up, then pause. - You completed the switch apps gesture. You\'re ready to use your phone! + + You learned how to use gestures. To turn off gestures, go to Settings. + + You completed the switch apps gesture. Swipe to switch apps diff --git a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java index 14c3a92f49..a0fb51c432 100644 --- a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java @@ -46,6 +46,11 @@ final class BackGestureTutorialController extends TutorialController { ? R.string.back_gesture_intro_subtitle : null; } + @Override + protected int getMockAppTaskThumbnailResId() { + return R.drawable.mock_conversation; + } + @Override public void onBackGestureAttempted(BackGestureResult result) { switch (mTutorialType) { @@ -67,11 +72,14 @@ final class BackGestureTutorialController extends TutorialController { private void handleAttemptFromRight(BackGestureResult result) { switch (result) { case BACK_COMPLETED_FROM_RIGHT: + mTutorialFragment.releaseGestureVideoView(); hideFeedback(true); mFakeTaskView.setBackground(AppCompatResources.getDrawable(mContext, - R.drawable.sandbox_fake_google_search)); - showRippleEffect(null); - showFeedback(R.string.back_gesture_feedback_complete, true); + R.drawable.mock_conversations_list)); + int subtitleResId = mTutorialFragment.getNumSteps() == 1 + ? R.string.back_gesture_feedback_complete_without_follow_up + : R.string.back_gesture_feedback_complete_with_follow_up; + showFeedback(subtitleResId, true); break; case BACK_CANCELLED_FROM_RIGHT: showFeedback(R.string.back_gesture_feedback_cancelled_right_edge); @@ -90,11 +98,13 @@ final class BackGestureTutorialController extends TutorialController { private void handleAttemptFromLeft(BackGestureResult result) { switch (result) { case BACK_COMPLETED_FROM_LEFT: + mTutorialFragment.releaseGestureVideoView(); hideFeedback(true); mFakeTaskView.setBackground(AppCompatResources.getDrawable(mContext, - R.drawable.sandbox_fake_google_search)); - showRippleEffect(null); - showFeedback(R.string.back_gesture_feedback_complete_left_edge, + R.drawable.mock_conversations_list)); + showFeedback( + R.string.back_gesture_feedback_title_complete_left_edge, + R.string.back_gesture_feedback_subtitle_complete_left_edge, () -> mTutorialFragment.changeController(RIGHT_EDGE_BACK_NAVIGATION)); break; case BACK_CANCELLED_FROM_LEFT: diff --git a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java index 71d00f03a2..830d0ad54e 100644 --- a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java +++ b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java @@ -29,8 +29,16 @@ public class BackGestureTutorialFragment extends TutorialFragment { @Override Integer getFeedbackVideoResId() { return mTutorialType == TutorialType.RIGHT_EDGE_BACK_NAVIGATION - ? R.drawable.gesture_tutorial_back_right - : R.drawable.gesture_tutorial_back_left; + ? R.drawable.gesture_tutorial_motion_back_right + : R.drawable.gesture_tutorial_motion_back_left; + } + + @Nullable + @Override + Integer getGestureVideoResId() { + return mTutorialType == TutorialType.RIGHT_EDGE_BACK_NAVIGATION + ? R.drawable.gesture_tutorial_loop_back_right + : R.drawable.gesture_tutorial_loop_back_left; } @Override diff --git a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java index 2e580af18f..ff50a0e01b 100644 --- a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java @@ -41,6 +41,11 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll return R.string.home_gesture_intro_subtitle; } + @Override + protected int getMockAppTaskThumbnailResId() { + return R.drawable.mock_webpage; + } + @Override public void onBackGestureAttempted(BackGestureResult result) { switch (mTutorialType) { @@ -72,10 +77,13 @@ final class HomeGestureTutorialController extends SwipeUpGestureTutorialControll case HOME_NAVIGATION: switch (result) { case HOME_GESTURE_COMPLETED: { + mTutorialFragment.releaseGestureVideoView(); animateFakeTaskViewHome(finalVelocity, null); showActionButton(); - showFeedback(R.string.home_gesture_feedback_complete, - true); + int subtitleResId = mTutorialFragment.getNumSteps() == 1 + ? R.string.home_gesture_feedback_complete_without_follow_up + : R.string.home_gesture_feedback_complete_with_follow_up; + showFeedback(subtitleResId, true); break; } case HOME_NOT_STARTED_TOO_FAR_FROM_EDGE: diff --git a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialFragment.java index ebddc6934b..47964d27c3 100644 --- a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialFragment.java +++ b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialFragment.java @@ -25,7 +25,13 @@ public class HomeGestureTutorialFragment extends TutorialFragment { @Nullable @Override Integer getFeedbackVideoResId() { - return R.drawable.gesture_tutorial_home; + return R.drawable.gesture_tutorial_motion_home; + } + + @Nullable + @Override + Integer getGestureVideoResId() { + return R.drawable.gesture_tutorial_loop_home; } @Override diff --git a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java index 06610e6ad6..7b0961e121 100644 --- a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java @@ -48,6 +48,11 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont return R.string.overview_gesture_intro_subtitle; } + @Override + protected int getMockAppTaskThumbnailResId() { + return R.drawable.mock_conversations_list; + } + @Override public void onBackGestureAttempted(BackGestureResult result) { switch (mTutorialType) { @@ -90,6 +95,7 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont showFeedback(R.string.overview_gesture_feedback_swipe_too_far_from_edge); break; case OVERVIEW_GESTURE_COMPLETED: + mTutorialFragment.releaseGestureVideoView(); PendingAnimation anim = new PendingAnimation(300); anim.setFloat(mTaskViewSwipeUpAnimation .getCurrentShift(), AnimatedFloat.VALUE, 1, ACCEL); @@ -97,7 +103,10 @@ final class OverviewGestureTutorialController extends SwipeUpGestureTutorialCont animset.start(); mRunningWindowAnim = SwipeUpAnimationLogic.RunningWindowAnim.wrap(animset); onMotionPaused(true /*arbitrary value*/); - showFeedback(R.string.overview_gesture_feedback_complete, true); + int subtitleResId = mTutorialFragment.getNumSteps() == 1 + ? R.string.overview_gesture_feedback_complete_without_follow_up + : R.string.overview_gesture_feedback_complete_with_follow_up; + showFeedback(subtitleResId, true); break; case HOME_OR_OVERVIEW_NOT_STARTED_WRONG_SWIPE_DIRECTION: case HOME_OR_OVERVIEW_CANCELLED: diff --git a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java index 86344ab292..c919b96a46 100644 --- a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java +++ b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialFragment.java @@ -25,7 +25,13 @@ public class OverviewGestureTutorialFragment extends TutorialFragment { @Nullable @Override Integer getFeedbackVideoResId() { - return R.drawable.gesture_tutorial_overview; + return R.drawable.gesture_tutorial_motion_overview; + } + + @Nullable + @Override + Integer getGestureVideoResId() { + return R.drawable.gesture_tutorial_loop_overview; } @Override diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java index 1128a7ca24..f9d5c94375 100644 --- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java +++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java @@ -62,6 +62,7 @@ abstract class TutorialController implements BackGestureAttemptCallback, final ImageButton mCloseButton; final ViewGroup mFeedbackView; final ImageView mFeedbackVideoView; + final ImageView mGestureVideoView; final ImageView mFakeLauncherView; final ClipIconView mFakeIconView; final View mFakeTaskView; @@ -84,6 +85,7 @@ abstract class TutorialController implements BackGestureAttemptCallback, mCloseButton.setOnClickListener(button -> showSkipTutorialDialog()); mFeedbackView = rootView.findViewById(R.id.gesture_tutorial_fragment_feedback_view); mFeedbackVideoView = rootView.findViewById(R.id.gesture_tutorial_feedback_video); + mGestureVideoView = rootView.findViewById(R.id.gesture_tutorial_gesture_video); mFakeLauncherView = rootView.findViewById(R.id.gesture_tutorial_fake_launcher_view); mFakeIconView = rootView.findViewById(R.id.gesture_tutorial_fake_icon_view); mFakeTaskView = rootView.findViewById(R.id.gesture_tutorial_fake_task_view); @@ -173,8 +175,8 @@ abstract class TutorialController implements BackGestureAttemptCallback, /** * Show feedback reflecting a failed gesture attempt. **/ - void showFeedback(int subtitleResId, @Nullable Runnable successEndAction) { - showFeedback(subtitleResId, successEndAction, false); + void showFeedback(int titleResId, int subtitleResId, @Nullable Runnable successEndAction) { + showFeedback(titleResId, subtitleResId, successEndAction, false); } /** @@ -212,7 +214,8 @@ abstract class TutorialController implements BackGestureAttemptCallback, mHideFeedbackEndAction = successEndAction; AnimatedVectorDrawable tutorialAnimation = mTutorialFragment.getTutorialAnimation(); - if (tutorialAnimation != null) { + AnimatedVectorDrawable gestureAnimation = mTutorialFragment.getGestureAnimation(); + if (tutorialAnimation != null && gestureAnimation != null) { if (successEndAction == null) { if (tutorialAnimation.isRunning()) { tutorialAnimation.reset(); @@ -223,6 +226,11 @@ abstract class TutorialController implements BackGestureAttemptCallback, public void onAnimationStart(Drawable drawable) { super.onAnimationStart(drawable); + mGestureVideoView.setVisibility(View.GONE); + if (gestureAnimation.isRunning()) { + gestureAnimation.stop(); + } + mFeedbackView.setTranslationY( -mFeedbackView.getHeight() - mFeedbackView.getTop()); mFeedbackView.setVisibility(View.VISIBLE); @@ -236,6 +244,9 @@ abstract class TutorialController implements BackGestureAttemptCallback, public void onAnimationEnd(Drawable drawable) { super.onAnimationEnd(drawable); + mGestureVideoView.setVisibility(View.VISIBLE); + gestureAnimation.start(); + mFeedbackView.removeCallbacks(mHideFeedbackRunnable); mFeedbackView.post(mHideFeedbackRunnable); diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java index b6663b8b81..0220f2d21f 100644 --- a/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java +++ b/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java @@ -51,8 +51,10 @@ abstract class TutorialFragment extends Fragment implements OnTouchListener { EdgeBackGestureHandler mEdgeBackGestureHandler; NavBarGestureHandler mNavBarGestureHandler; private ImageView mFeedbackVideoView; + private ImageView mGestureVideoView; @Nullable private AnimatedVectorDrawable mTutorialAnimation = null; + @Nullable private AnimatedVectorDrawable mGestureAnimation = null; private boolean mIntroductionShown = false; public static TutorialFragment newInstance(TutorialType tutorialType) { @@ -96,11 +98,20 @@ abstract class TutorialFragment extends Fragment implements OnTouchListener { return null; } + @Nullable Integer getGestureVideoResId() { + return null; + } + @Nullable AnimatedVectorDrawable getTutorialAnimation() { return mTutorialAnimation; } + @Nullable + AnimatedVectorDrawable getGestureAnimation() { + return mGestureAnimation; + } + abstract TutorialController createController(TutorialType type); abstract Class getControllerClass(); @@ -135,6 +146,7 @@ abstract class TutorialFragment extends Fragment implements OnTouchListener { }); mRootView.setOnTouchListener(this); mFeedbackVideoView = mRootView.findViewById(R.id.gesture_tutorial_feedback_video); + mGestureVideoView = mRootView.findViewById(R.id.gesture_tutorial_gesture_video); return mRootView; } @@ -162,7 +174,7 @@ abstract class TutorialFragment extends Fragment implements OnTouchListener { boolean updateFeedbackVideo() { Integer feedbackVideoResId = getFeedbackVideoResId(); - if (feedbackVideoResId == null || getContext() == null) { + if (feedbackVideoResId == null || getContext() == null || !updateGestureVideo()) { return false; } mTutorialAnimation = (AnimatedVectorDrawable) getContext().getDrawable(feedbackVideoResId); @@ -190,6 +202,29 @@ abstract class TutorialFragment extends Fragment implements OnTouchListener { return true; } + boolean updateGestureVideo() { + Integer gestureVideoResId = getGestureVideoResId(); + if (gestureVideoResId == null || getContext() == null) { + return false; + } + mGestureAnimation = (AnimatedVectorDrawable) getContext().getDrawable(gestureVideoResId); + + if (mGestureAnimation != null) { + mGestureAnimation.registerAnimationCallback(new Animatable2.AnimationCallback() { + + @Override + public void onAnimationEnd(Drawable drawable) { + super.onAnimationEnd(drawable); + + mGestureAnimation.start(); + } + }); + } + mGestureVideoView.setImageDrawable(mGestureAnimation); + + return true; + } + void releaseFeedbackVideoView() { if (mTutorialAnimation != null && mTutorialAnimation.isRunning()) { mTutorialAnimation.stop(); @@ -198,6 +233,14 @@ abstract class TutorialFragment extends Fragment implements OnTouchListener { mFeedbackVideoView.setVisibility(View.GONE); } + void releaseGestureVideoView() { + if (mGestureAnimation != null && mGestureAnimation.isRunning()) { + mGestureAnimation.stop(); + } + + mGestureVideoView.setVisibility(View.GONE); + } + @Override public void onResume() { super.onResume(); diff --git a/src/com/android/launcher3/settings/DeveloperOptionsFragment.java b/src/com/android/launcher3/settings/DeveloperOptionsFragment.java index 217453fb63..d0a8c711b0 100644 --- a/src/com/android/launcher3/settings/DeveloperOptionsFragment.java +++ b/src/com/android/launcher3/settings/DeveloperOptionsFragment.java @@ -277,8 +277,8 @@ public class DeveloperOptionsFragment extends PreferenceFragmentCompat { startActivity(launchSandboxIntent.putExtra( "tutorial_steps", new String[] { - "LEFT_EDGE_BACK_NAVIGATION", "HOME_NAVIGATION", + "LEFT_EDGE_BACK_NAVIGATION", "OVERVIEW_NAVIGATION"})); return true; });