Merge "Scale task rounded corners proportional to TaskView size." into sc-v2-dev
diff --git a/go/quickstep/res/layout/overview_actions_container.xml b/go/quickstep/res/layout/overview_actions_container.xml
index e7da196..0e718ca 100644
--- a/go/quickstep/res/layout/overview_actions_container.xml
+++ b/go/quickstep/res/layout/overview_actions_container.xml
@@ -34,6 +34,7 @@
android:layout_weight="1" />
<LinearLayout
+ android:id="@+id/layout_translate"
style="@style/GoOverviewActionButtonContainer">
<ImageButton
android:id="@+id/action_translate"
@@ -46,10 +47,12 @@
</LinearLayout>
<Space
+ android:id="@+id/spacer_translate"
android:layout_width="@dimen/go_overview_button_container_margin"
android:layout_height="1dp" />
<LinearLayout
+ android:id="@+id/layout_listen"
style="@style/GoOverviewActionButtonContainer">
<ImageButton
android:id="@+id/action_listen"
@@ -63,10 +66,12 @@
</LinearLayout>
<Space
+ android:id="@+id/spacer_listen"
android:layout_width="@dimen/go_overview_button_container_margin"
android:layout_height="1dp" />
<LinearLayout
+ android:id="@+id/layout_screenshot"
style="@style/GoOverviewActionButtonContainer">
<ImageButton
android:id="@+id/action_screenshot"
diff --git a/go/quickstep/src/com/android/quickstep/views/GoOverviewActionsView.java b/go/quickstep/src/com/android/quickstep/views/GoOverviewActionsView.java
index 5b535a2..97ba590 100644
--- a/go/quickstep/src/com/android/quickstep/views/GoOverviewActionsView.java
+++ b/go/quickstep/src/com/android/quickstep/views/GoOverviewActionsView.java
@@ -16,6 +16,8 @@
package com.android.quickstep.views;
+import static android.view.View.GONE;
+
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
@@ -54,11 +56,11 @@
if (getResources().getBoolean(R.bool.enable_niu_actions)) {
findViewById(R.id.action_listen).setOnClickListener(this);
findViewById(R.id.action_translate).setOnClickListener(this);
- findViewById(R.id.action_search).setOnClickListener(this);
} else {
- findViewById(R.id.action_listen).setVisibility(View.GONE);
- findViewById(R.id.action_translate).setVisibility(View.GONE);
- findViewById(R.id.action_search).setVisibility(View.GONE);
+ findViewById(R.id.layout_listen).setVisibility(GONE);
+ findViewById(R.id.spacer_listen).setVisibility(GONE);
+ findViewById(R.id.layout_translate).setVisibility(GONE);
+ findViewById(R.id.spacer_translate).setVisibility(GONE);
}
}
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_back_left.xml b/quickstep/res/drawable/gesture_tutorial_loop_back.xml
similarity index 100%
rename from quickstep/res/drawable/gesture_tutorial_loop_back_left.xml
rename to quickstep/res/drawable/gesture_tutorial_loop_back.xml
diff --git a/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml b/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml
deleted file mode 100644
index c20b252..0000000
--- a/quickstep/res/drawable/gesture_tutorial_loop_back_right.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="_R_G_L_1_G_D_0_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="1000"
- android:propertyName="fillAlpha"
- android:startOffset="0"
- android:valueFrom="0.25"
- android:valueTo="0.75"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="1000"
- android:propertyName="fillAlpha"
- android:startOffset="1000"
- android:valueFrom="0.75"
- android:valueTo="0.25"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="783"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="2000"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_1_G"
- android:translateX="399.5"
- android:translateY="446">
- <path
- android:name="_R_G_L_1_G_D_0_P_0"
- android:fillAlpha="0.25"
- android:fillColor="@color/gesture_tutorial_primary_color"
- android:fillType="nonZero"
- android:pathData=" M12.5 -446 C12.5,-446 12.5,446 12.5,446 C12.5,446 -12.5,446 -12.5,446 C-12.5,446 -12.5,-446 -12.5,-446 C-12.5,-446 12.5,-446 12.5,-446c " />
- </group>
- <group
- android:name="_R_G_L_0_G"
- android:translateX="206"
- android:translateY="446" />
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ 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.xml
similarity index 100%
rename from quickstep/res/drawable/gesture_tutorial_motion_back_left.xml
rename to quickstep/res/drawable/gesture_tutorial_motion_back.xml
diff --git a/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml b/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml
deleted file mode 100644
index b368d9d..0000000
--- a/quickstep/res/drawable/gesture_tutorial_motion_back_right.xml
+++ /dev/null
@@ -1,1233 +0,0 @@
-<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:aapt="http://schemas.android.com/aapt">
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_0_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_1_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_2_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_3_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_4_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_5_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_6_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_7_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_8_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_9_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_10_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_11_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_12_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G_L_0_G_D_13_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="133"
- android:propertyName="fillAlpha"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="1367"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="283"
- android:propertyName="scaleX"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0.88012"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,0.536 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="283"
- android:propertyName="scaleY"
- android:startOffset="1217"
- android:valueFrom="1"
- android:valueTo="0.88012"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,0.536 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_3_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="2417"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_0_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_1_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_2_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_3_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_4_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_5_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_6_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_7_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_8_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_9_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_10_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_11_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_12_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_13_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_14_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_15_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_16_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_17_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_18_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_19_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_20_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_21_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_22_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_23_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G_D_24_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="333"
- android:propertyName="fillAlpha"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G_L_0_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_2_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="1417"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_1_G_D_0_P_0_G_0_T_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="667"
- android:pathData="M 565.282,129.757C 554.782,129.757 512.7819999999999,129.757 502.282,129.757"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="217">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.5,0 0,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="333"
- android:pathData="M 502.282,129.757C 502.282,129.757 502.282,129.757 502.282,129.757"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="883">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0.333 0.667,0.667 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="250"
- android:pathData="M 502.282,129.757C 512.7819999999999,129.757 554.782,129.757 565.282,129.757"
- android:propertyName="translateXY"
- android:propertyXName="translateX"
- android:propertyYName="translateY"
- android:startOffset="1217">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_1_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="217"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_1_G">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="0"
- android:propertyName="scaleY"
- android:startOffset="2383"
- android:valueFrom="1"
- android:valueTo="0"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G_D_0_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="217"
- android:propertyName="fillAlpha"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="0.75"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="967"
- android:propertyName="fillAlpha"
- android:startOffset="217"
- android:valueFrom="0.75"
- android:valueTo="0.75"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.833,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="167"
- android:propertyName="fillAlpha"
- android:startOffset="1183"
- android:valueFrom="0.75"
- android:valueTo="0"
- android:valueType="floatType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0 0.833,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="_R_G_L_0_G_D_0_P_0">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="217"
- android:propertyName="pathData"
- android:startOffset="0"
- android:valueFrom="M205 13.5 C225.16,13.5 241.5,29.84 241.5,50 C241.5,70.16 225.16,86.5 205,86.5 C184.84,86.5 168.5,70.16 168.5,50 C168.5,29.84 184.84,13.5 205,13.5c "
- android:valueTo="M205.5 0 C233.11,0 255.5,22.39 255.5,50 C255.5,77.61 233.11,100 205.5,100 C177.89,100 155.5,77.61 155.5,50 C155.5,22.39 177.89,0 205.5,0c "
- android:valueType="pathType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="583"
- android:propertyName="pathData"
- android:startOffset="217"
- android:valueFrom="M205.5 0 C233.11,0 255.5,22.39 255.5,50 C255.5,77.61 233.11,100 205.5,100 C177.89,100 155.5,77.61 155.5,50 C155.5,22.39 177.89,0 205.5,0c "
- android:valueTo="M0 0 C27.61,0 50,22.39 50,50 C50,77.61 27.61,100 0,100 C-27.61,100 -50,77.61 -50,50 C-50,22.39 -27.61,0 0,0c "
- android:valueType="pathType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.5,0 0.5,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="383"
- android:propertyName="pathData"
- android:startOffset="800"
- android:valueFrom="M0 0 C27.61,0 50,22.39 50,50 C50,77.61 27.61,100 0,100 C-27.61,100 -50,77.61 -50,50 C-50,22.39 -27.61,0 0,0c "
- android:valueTo="M0 0 C27.61,0 50,22.39 50,50 C50,77.61 27.61,100 0,100 C-27.61,100 -50,77.61 -50,50 C-50,22.39 -27.61,0 0,0c "
- android:valueType="pathType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- <objectAnimator
- android:duration="167"
- android:propertyName="pathData"
- android:startOffset="1183"
- android:valueFrom="M0 0 C27.61,0 50,22.39 50,50 C50,77.61 27.61,100 0,100 C-27.61,100 -50,77.61 -50,50 C-50,22.39 -27.61,0 0,0c "
- android:valueTo="M0 13.5 C20.16,13.5 36.5,29.84 36.5,50 C36.5,70.16 20.16,86.5 0,86.5 C-20.16,86.5 -36.5,70.16 -36.5,50 C-36.5,29.84 -20.16,13.5 0,13.5c "
- android:valueType="pathType">
- <aapt:attr name="android:interpolator">
- <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
- </aapt:attr>
- </objectAnimator>
- </set>
- </aapt:attr>
- </target>
- <target android:name="time_group">
- <aapt:attr name="android:animation">
- <set android:ordering="together">
- <objectAnimator
- android:duration="1767"
- android:propertyName="translateX"
- android:startOffset="0"
- android:valueFrom="0"
- android:valueTo="1"
- android:valueType="floatType" />
- </set>
- </aapt:attr>
- </target>
- <aapt:attr name="android:drawable">
- <vector
- android:width="412dp"
- android:height="892dp"
- android:viewportHeight="892"
- android:viewportWidth="412">
- <group android:name="_R_G">
- <group
- android:name="_R_G_L_4_G"
- android:translateX="206"
- android:translateY="446">
- <path
- android:name="_R_G_L_4_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M206 -446 C206,-446 206,446 206,446 C206,446 -206,446 -206,446 C-206,446 -206,-446 -206,-446 C-206,-446 206,-446 206,-446c " />
- </group>
- <group
- android:name="_R_G_L_3_G"
- android:pivotX="206"
- android:pivotY="446"
- android:scaleX="1"
- android:scaleY="1">
- <group android:name="_R_G_L_3_G_L_0_G">
- <group android:name="_R_G_L_3_G_L_0_G_L_0_G">
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="#f1f3f4"
- android:fillType="nonZero"
- android:pathData=" M412 101 C412,101 412,892 412,892 C412,892 0,892 0,892 C0,892 0,101 0,101 C0,101 412,101 412,101c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_1_P_0"
- android:fillAlpha="1"
- android:fillColor="#e8eaed"
- android:fillType="nonZero"
- android:pathData=" M412 0 C412,0 412,101 412,101 C412,101 0,101 0,101 C0,101 0,0 0,0 C0,0 412,0 412,0c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_2_P_0"
- android:fillAlpha="1"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M383 804 C383,816.15 373.15,826 361,826 C361,826 51,826 51,826 C38.85,826 29,816.15 29,804 C29,791.85 38.85,782 51,782 C51,782 361,782 361,782 C373.15,782 383,791.85 383,804c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_3_P_0"
- android:fillAlpha="1"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M201 47 C201,47 201,75 201,75 C201,77.21 199.21,79 197,79 C197,79 38,79 38,79 C35.79,79 34,77.21 34,75 C34,75 34,47 34,47 C34,44.79 35.79,43 38,43 C38,43 197,43 197,43 C199.21,43 201,44.79 201,47c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_4_P_0"
- android:fillAlpha="1"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M388 47 C388,47 388,75 388,75 C388,77.21 386.21,79 384,79 C384,79 356,79 356,79 C353.79,79 352,77.21 352,75 C352,75 352,47 352,47 C352,44.79 353.79,43 356,43 C356,43 384,43 384,43 C386.21,43 388,44.79 388,47c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_5_P_0"
- android:fillAlpha="1"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M336 47 C336,47 336,75 336,75 C336,77.21 334.21,79 332,79 C332,79 304,79 304,79 C301.79,79 300,77.21 300,75 C300,75 300,47 300,47 C300,44.79 301.79,43 304,43 C304,43 332,43 332,43 C334.21,43 336,44.79 336,47c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_6_P_0"
- android:fillAlpha="1"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M70 618 C70,630.15 60.15,640 48,640 C35.85,640 26,630.15 26,618 C26,605.85 35.85,596 48,596 C60.15,596 70,605.85 70,618c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_7_P_0"
- android:fillAlpha="1"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M70 396 C70,408.15 60.15,418 48,418 C35.85,418 26,408.15 26,396 C26,383.85 35.85,374 48,374 C60.15,374 70,383.85 70,396c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_8_P_0"
- android:fillAlpha="1"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M394 248 C394,248 394,324 394,324 C394,333.94 385.94,342 376,342 C376,342 142,342 142,342 C132.06,342 124,333.94 124,324 C124,324 124,248 124,248 C124,238.06 132.06,230 142,230 C142,230 376,230 376,230 C385.94,230 394,238.06 394,248c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_9_P_0"
- android:fillAlpha="1"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M393.94 468.38 C393.94,468.38 393.94,481.5 393.94,481.5 C393.94,483.71 392.15,485.5 389.94,485.5 C389.94,485.5 303.5,485.5 303.5,485.5 C301.29,485.5 299.5,483.71 299.5,481.5 C299.5,481.5 299.5,468.38 299.5,468.38 C299.5,466.17 301.29,464.38 303.5,464.38 C303.5,464.38 389.94,464.38 389.94,464.38 C392.15,464.38 393.94,466.17 393.94,468.38c M394 468 C394,477.67 386.17,485.5 376.5,485.5 C376.5,485.5 290,485.5 290,485.5 C280.33,485.5 272.5,477.67 272.5,468 C272.5,458.34 280.33,450.5 290,450.5 C290,450.5 376.5,450.5 376.5,450.5 C386.17,450.5 394,458.34 394,468c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_10_P_0"
- android:fillAlpha="1"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M394 494 C394,494 394,547 394,547 C394,549.21 392.21,551 390,551 C390,551 164,551 164,551 C161.79,551 160,549.21 160,547 C160,547 160,494 160,494 C160,491.79 161.79,490 164,490 C164,490 390,490 390,490 C392.21,490 394,491.79 394,494c M394 508 C394,508 394,545 394,545 C394,554.94 385.94,563 376,563 C376,563 142,563 142,563 C132.06,563 124,554.94 124,545 C124,545 124,508 124,508 C124,498.06 132.06,490 142,490 C142,490 376,490 376,490 C385.94,490 394,498.06 394,508c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_11_P_0"
- android:fillAlpha="1"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M394 690 C394,690 394,727 394,727 C394,736.94 385.94,745 376,745 C376,745 142,745 142,745 C132.06,745 124,736.94 124,727 C124,727 124,690 124,690 C124,680.06 132.06,672 142,672 C142,672 376,672 376,672 C385.94,672 394,680.06 394,690c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_12_P_0"
- android:fillAlpha="1"
- android:fillColor="#e8eaed"
- android:fillType="nonZero"
- android:pathData=" M267.5 617 C267.5,626.67 259.67,634.5 250,634.5 C250,634.5 104.5,634.5 104.5,634.5 C94.84,634.5 87,626.67 87,617 C87,607.34 94.84,599.5 104.5,599.5 C104.5,599.5 250,599.5 250,599.5 C259.67,599.5 267.5,607.34 267.5,617c " />
- <path
- android:name="_R_G_L_3_G_L_0_G_L_0_G_D_13_P_0"
- android:fillAlpha="1"
- android:fillColor="#e8eaed"
- android:fillType="nonZero"
- android:pathData=" M299 395.5 C299,405.17 291.16,413 281.5,413 C281.5,413 104.5,413 104.5,413 C94.84,413 87,405.17 87,395.5 C87,385.84 94.84,378 104.5,378 C104.5,378 281.5,378 281.5,378 C291.16,378 299,385.84 299,395.5c " />
- </group>
- </group>
- </group>
- <group
- android:name="_R_G_L_2_G"
- android:scaleY="0">
- <group
- android:name="_R_G_L_2_G_L_0_G"
- android:scaleY="0">
- <group
- android:name="_R_G_L_2_G_L_0_G_L_0_G"
- android:scaleY="0">
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_0_P_0"
- android:fillAlpha="0"
- android:fillColor="#dadce0"
- android:fillType="nonZero"
- android:pathData=" M412 0 C412,0 412,892 412,892 C412,892 0,892 0,892 C0,892 0,0 0,0 C0,0 412,0 412,0c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_1_P_0"
- android:fillAlpha="0"
- android:fillColor="#e8eaed"
- android:fillType="nonZero"
- android:pathData=" M412 0 C412,0 412,101 412,101 C412,101 0,101 0,101 C0,101 0,0 0,0 C0,0 412,0 412,0c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_2_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M195 143 C195,143 195,153 195,153 C195,155.21 193.21,157 191,157 C191,157 106,157 106,157 C103.79,157 102,155.21 102,153 C102,153 102,143 102,143 C102,140.79 103.79,139 106,139 C106,139 191,139 191,139 C193.21,139 195,140.79 195,143c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_3_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M270 165 C270,165 270,173 270,173 C270,175.21 268.21,177 266,177 C266,177 106,177 106,177 C103.79,177 102,175.21 102,173 C102,173 102,165 102,165 C102,162.79 103.79,161 106,161 C106,161 266,161 266,161 C268.21,161 270,162.79 270,165c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_4_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M222 231 C222,231 222,241 222,241 C222,243.21 220.21,245 218,245 C218,245 106,245 106,245 C103.79,245 102,243.21 102,241 C102,241 102,231 102,231 C102,228.79 103.79,227 106,227 C106,227 218,227 218,227 C220.21,227 222,228.79 222,231c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_5_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M241 253 C241,253 241,261 241,261 C241,263.21 239.21,265 237,265 C237,265 106,265 106,265 C103.79,265 102,263.21 102,261 C102,261 102,253 102,253 C102,250.79 103.79,249 106,249 C106,249 237,249 237,249 C239.21,249 241,250.79 241,253c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_6_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M214 319 C214,319 214,329 214,329 C214,331.21 212.21,333 210,333 C210,333 106,333 106,333 C103.79,333 102,331.21 102,329 C102,329 102,319 102,319 C102,316.79 103.79,315 106,315 C106,315 210,315 210,315 C212.21,315 214,316.79 214,319c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_7_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M333 341 C333,341 333,349 333,349 C333,351.21 331.21,353 329,353 C329,353 106,353 106,353 C103.79,353 102,351.21 102,349 C102,349 102,341 102,341 C102,338.79 103.79,337 106,337 C106,337 329,337 329,337 C331.21,337 333,338.79 333,341c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_8_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M238 407 C238,407 238,417 238,417 C238,419.21 236.21,421 234,421 C234,421 106,421 106,421 C103.79,421 102,419.21 102,417 C102,417 102,407 102,407 C102,404.79 103.79,403 106,403 C106,403 234,403 234,403 C236.21,403 238,404.79 238,407c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_9_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M295 429 C295,429 295,437 295,437 C295,439.21 293.21,441 291,441 C291,441 106,441 106,441 C103.79,441 102,439.21 102,437 C102,437 102,429 102,429 C102,426.79 103.79,425 106,425 C106,425 291,425 291,425 C293.21,425 295,426.79 295,429c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_10_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M168 495 C168,495 168,505 168,505 C168,507.21 166.21,509 164,509 C164,509 106,509 106,509 C103.79,509 102,507.21 102,505 C102,505 102,495 102,495 C102,492.79 103.79,491 106,491 C106,491 164,491 164,491 C166.21,491 168,492.79 168,495c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_11_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M269 517 C269,517 269,525 269,525 C269,527.21 267.21,529 265,529 C265,529 106,529 106,529 C103.79,529 102,527.21 102,525 C102,525 102,517 102,517 C102,514.79 103.79,513 106,513 C106,513 265,513 265,513 C267.21,513 269,514.79 269,517c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_12_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M235 583 C235,583 235,593 235,593 C235,595.21 233.21,597 231,597 C231,597 106,597 106,597 C103.79,597 102,595.21 102,593 C102,593 102,583 102,583 C102,580.79 103.79,579 106,579 C106,579 231,579 231,579 C233.21,579 235,580.79 235,583c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_13_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M295 605 C295,605 295,613 295,613 C295,615.21 293.21,617 291,617 C291,617 106,617 106,617 C103.79,617 102,615.21 102,613 C102,613 102,605 102,605 C102,602.79 103.79,601 106,601 C106,601 291,601 291,601 C293.21,601 295,602.79 295,605c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_14_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M223 671 C223,671 223,681 223,681 C223,683.21 221.21,685 219,685 C219,685 106,685 106,685 C103.79,685 102,683.21 102,681 C102,681 102,671 102,671 C102,668.79 103.79,667 106,667 C106,667 219,667 219,667 C221.21,667 223,668.79 223,671c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_15_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M246 693 C246,693 246,701 246,701 C246,703.21 244.21,705 242,705 C242,705 106,705 106,705 C103.79,705 102,703.21 102,701 C102,701 102,693 102,693 C102,690.79 103.79,689 106,689 C106,689 242,689 242,689 C244.21,689 246,690.79 246,693c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_16_P_0"
- android:fillAlpha="0"
- android:fillColor="#bdc1c6"
- android:fillType="nonZero"
- android:pathData=" M388 798 C388,798 388,798 388,798 C388,813.45 375.45,826 360,826 C360,826 267,826 267,826 C251.55,826 239,813.45 239,798 C239,798 239,798 239,798 C239,782.55 251.55,770 267,770 C267,770 360,770 360,770 C375.45,770 388,782.55 388,798c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_17_P_0"
- android:fillAlpha="0"
- android:fillColor="#f8f9fa"
- android:fillType="nonZero"
- android:pathData=" M377 47 C377,47 377,75 377,75 C377,77.21 375.21,79 373,79 C373,79 38,79 38,79 C35.79,79 34,77.21 34,75 C34,75 34,47 34,47 C34,44.79 35.79,43 38,43 C38,43 373,43 373,43 C375.21,43 377,44.79 377,47c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_18_P_0"
- android:fillAlpha="0"
- android:fillColor="#9aa0a6"
- android:fillType="nonZero"
- android:pathData=" M82 157 C82,172.46 69.46,185 54,185 C38.54,185 26,172.46 26,157 C26,141.54 38.54,129 54,129 C69.46,129 82,141.54 82,157c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_19_P_0"
- android:fillAlpha="0"
- android:fillColor="#9aa0a6"
- android:fillType="nonZero"
- android:pathData=" M82 245 C82,260.46 69.46,273 54,273 C38.54,273 26,260.46 26,245 C26,229.54 38.54,217 54,217 C69.46,217 82,229.54 82,245c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_20_P_0"
- android:fillAlpha="0"
- android:fillColor="#9aa0a6"
- android:fillType="nonZero"
- android:pathData=" M82 333 C82,348.46 69.46,361 54,361 C38.54,361 26,348.46 26,333 C26,317.54 38.54,305 54,305 C69.46,305 82,317.54 82,333c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_21_P_0"
- android:fillAlpha="0"
- android:fillColor="#9aa0a6"
- android:fillType="nonZero"
- android:pathData=" M82 421 C82,436.46 69.46,449 54,449 C38.54,449 26,436.46 26,421 C26,405.54 38.54,393 54,393 C69.46,393 82,405.54 82,421c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_22_P_0"
- android:fillAlpha="0"
- android:fillColor="#9aa0a6"
- android:fillType="nonZero"
- android:pathData=" M82 509 C82,524.46 69.46,537 54,537 C38.54,537 26,524.46 26,509 C26,493.54 38.54,481 54,481 C69.46,481 82,493.54 82,509c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_23_P_0"
- android:fillAlpha="0"
- android:fillColor="#9aa0a6"
- android:fillType="nonZero"
- android:pathData=" M82 597 C82,612.46 69.46,625 54,625 C38.54,625 26,612.46 26,597 C26,581.54 38.54,569 54,569 C69.46,569 82,581.54 82,597c " />
- <path
- android:name="_R_G_L_2_G_L_0_G_L_0_G_D_24_P_0"
- android:fillAlpha="0"
- android:fillColor="#9aa0a6"
- android:fillType="nonZero"
- android:pathData=" M82 685 C82,700.46 69.46,713 54,713 C38.54,713 26,700.46 26,685 C26,669.54 38.54,657 54,657 C69.46,657 82,669.54 82,685c " />
- </group>
- </group>
- </group>
- <group
- android:name="_R_G_L_1_G"
- android:scaleY="0"
- android:translateX="-17.875"
- android:translateY="322.017">
- <group
- android:name="_R_G_L_1_G_D_0_P_0_G_0_T_0"
- android:translateX="565.282"
- android:translateY="129.757">
- <path
- android:name="_R_G_L_1_G_D_0_P_0"
- android:fillAlpha="1"
- android:fillColor="#3b4043"
- android:fillType="nonZero"
- android:pathData=" M-109 27.43 C-109,27.43 -112.61,23.81 -112.61,23.81 C-112.61,23.81 -133.03,44.23 -133.03,44.23 C-133.03,44.23 -112.61,64.64 -112.61,64.64 C-112.61,64.64 -109,61.03 -109,61.03 C-109,61.03 -125.8,44.23 -125.8,44.23 C-125.8,44.23 -109,27.43 -109,27.43c " />
- </group>
- </group>
- <group
- android:name="_R_G_L_0_G"
- android:translateX="206"
- android:translateY="446">
- <path
- android:name="_R_G_L_0_G_D_0_P_0"
- android:fillAlpha="0"
- android:fillColor="@color/gesture_tutorial_primary_color"
- android:fillType="nonZero"
- android:pathData=" M205 13.5 C225.16,13.5 241.5,29.84 241.5,50 C241.5,70.16 225.16,86.5 205,86.5 C184.84,86.5 168.5,70.16 168.5,50 C168.5,29.84 184.84,13.5 205,13.5c " />
- </group>
- </group>
- <group android:name="time_group" />
- </vector>
- </aapt:attr>
-</animated-vector>
\ No newline at end of file
diff --git a/quickstep/res/drawable/tutorial_step_indicator_pill.xml b/quickstep/res/drawable/tutorial_step_indicator_pill.xml
index 94a8748..d4e8f84 100644
--- a/quickstep/res/drawable/tutorial_step_indicator_pill.xml
+++ b/quickstep/res/drawable/tutorial_step_indicator_pill.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <corners android:radius="10dp"/>
+ <corners android:radius="3dp"/>
<size android:width="16dp" android:height="6dp"/>
</shape>
\ No newline at end of file
diff --git a/quickstep/res/layout/gesture_tutorial_fragment.xml b/quickstep/res/layout/gesture_tutorial_fragment.xml
index 1e8d0e0..cdda43c 100644
--- a/quickstep/res/layout/gesture_tutorial_fragment.xml
+++ b/quickstep/res/layout/gesture_tutorial_fragment.xml
@@ -92,7 +92,8 @@
android:layout_marginStart="@dimen/gesture_tutorial_feedback_margin_start_end"
android:layout_marginEnd="@dimen/gesture_tutorial_feedback_margin_start_end"
android:layout_marginTop="24dp"
- android:padding="24dp"
+ android:paddingTop="24dp"
+ android:paddingBottom="16dp"
android:background="@drawable/bg_sandbox_feedback">
<TextView
@@ -100,6 +101,8 @@
style="@style/TextAppearance.GestureTutorial.Feedback.Title"
android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:layout_marginStart="24dp"
+ android:layout_marginEnd="24dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -111,6 +114,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
+ android:layout_marginStart="24dp"
+ android:layout_marginEnd="24dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -131,31 +136,36 @@
style="@style/TextAppearance.GestureTutorial.ButtonLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:paddingStart="16dp"
- android:paddingEnd="16dp"
- android:text="@string/gesture_tutorial_action_button_label_next"
+ android:layout_marginTop="32dp"
+ android:layout_marginEnd="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="26dp"
+ android:paddingEnd="26dp"
+ android:text="@string/gesture_tutorial_action_button_label"
android:background="@drawable/gesture_tutorial_action_button_background"
android:stateListAnimator="@null"
android:visibility="invisible"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_fragment_feedback_subtitle"/>
+ app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_fragment_feedback_subtitle"
+ app:layout_constraintEnd_toEndOf="parent"/>
<Button
style="@style/TextAppearance.GestureTutorial.Feedback.Subtext"
android:id="@+id/gesture_tutorial_fragment_close_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="32dp"
+ android:layout_marginEnd="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="26dp"
+ android:paddingEnd="26dp"
android:text="@string/gesture_tutorial_action_button_label_skip"
android:background="?android:attr/selectableItemBackgroundBorderless"
- app:layout_constraintTop_toTopOf="@id/gesture_tutorial_fragment_action_button"
- app:layout_constraintBottom_toBottomOf="@id/gesture_tutorial_fragment_action_button"
- app:layout_constraintStart_toStartOf="@id/gesture_tutorial_fragment_action_button"
- app:layout_constraintEnd_toEndOf="@id/gesture_tutorial_fragment_action_button"/>
+ app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_fragment_feedback_subtitle"
+ app:layout_constraintStart_toStartOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/quickstep/res/values/config.xml b/quickstep/res/values/config.xml
index f22a9d7..d67b23b 100644
--- a/quickstep/res/values/config.xml
+++ b/quickstep/res/values/config.xml
@@ -37,5 +37,5 @@
<string name="wellbeing_provider_pkg" translatable="false"/>
- <integer name="max_depth_blur_radius">72</integer>
+ <integer name="max_depth_blur_radius">23</integer>
</resources>
diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml
index 281f735..4aee2a9 100644
--- a/quickstep/res/values/strings.xml
+++ b/quickstep/res/values/strings.xml
@@ -91,16 +91,10 @@
<!-- content description for hotseat items -->
<string name="hotseat_prediction_content_description">Predicted app: <xliff:g id="title" example="Chrome">%1$s</xliff:g></string>
- <!-- Feedback shown during interactive parts of Back gesture tutorial for left edge when the gesture is too far from the edge. [CHAR LIMIT=100] -->
- <string name="back_gesture_feedback_swipe_too_far_from_left_edge">Make sure you swipe from the far-left edge.</string>
- <!-- Feedback shown during interactive parts of Back gesture tutorial for left edge when the gesture is cancelled. [CHAR LIMIT=100] -->
- <string name="back_gesture_feedback_cancelled_left_edge">Make sure you swipe from the left edge to the middle of the screen and let go.</string>
<!-- Feedback shown during interactive parts of Back gesture tutorial for right edge when the gesture is too far from the edge. [CHAR LIMIT=100] -->
- <string name="back_gesture_feedback_swipe_too_far_from_right_edge">Make sure you swipe from the far-right edge.</string>
+ <string name="back_gesture_feedback_swipe_too_far_from_edge">Make sure you swipe from the far-right or far-left edge.</string>
<!-- Feedback shown during interactive parts of Back gesture tutorial for right edge when the gesture is cancelled. [CHAR LIMIT=100] -->
- <string name="back_gesture_feedback_cancelled_right_edge">Make sure you swipe from the right edge to the middle of the screen and let go.</string>
- <!-- Feedback shown after completing the back gesture step if the user is following the full gesture tutorial flow. [CHAR LIMIT=100] -->
- <string name="back_gesture_feedback_complete_with_back_right_follow_up">You learned how to swipe from the left to go back.</string>
+ <string name="back_gesture_feedback_cancelled">Make sure you swipe from the right or left edge to the middle of the screen and let go.</string>
<!-- Feedback shown after completing the back gesture step if the user is following the full gesture tutorial flow. [CHAR LIMIT=100] -->
<string name="back_gesture_feedback_complete_with_overview_follow_up">You learned how to swipe from the right to go back. Next up, learn how to switch apps.</string>
<!-- Feedback shown after completing the back gesture step if the user started this tutorial individually. [CHAR LIMIT=100] -->
@@ -110,14 +104,10 @@
<!-- Subtitle shown on the confirmation screen after successful gesture. [CHAR LIMIT=60] -->
<string name="back_gesture_tutorial_confirm_subtitle">To change the sensitivity of the back gesture, go to Settings</string>
<!-- Feedback shown during interactive parts of Home gesture tutorial when the gesture is started too far from the edge. [CHAR LIMIT=100] -->
- <!-- Introduction title for the left edge Back gesture tutorial. [CHAR LIMIT=100] -->
- <string name="back_left_gesture_intro_title">Swipe from the left to go back</string>
- <!-- Introduction title for the right edge Back gesture tutorial. [CHAR LIMIT=100] -->
- <string name="back_right_gesture_intro_title">Swipe from the right to go back</string>
- <!-- Introduction subtitle for the Back left gesture tutorial. [CHAR LIMIT=200] -->
- <string name="back_left_gesture_intro_subtitle">To go back to the last screen you were on, swipe from the left edge to the middle of the screen.</string>
- <!-- Introduction subtitle for the Back right gesture tutorial. [CHAR LIMIT=100] -->
- <string name="back_right_gesture_intro_subtitle">You can also go back to the last screen by swiping from the right edge to the middle of the screen. Try it now.</string>
+ <!-- Introduction title for the Back gesture tutorial. [CHAR LIMIT=100] -->
+ <string name="back_gesture_intro_title">Swipe to go back</string>
+ <!-- Introduction subtitle for the Back gesture tutorial. [CHAR LIMIT=200] -->
+ <string name="back_gesture_intro_subtitle">To go back to the last screen, swipe from the left or right edge to the middle of the screen.</string>
<string name="home_gesture_feedback_swipe_too_far_from_edge">Make sure you swipe up from the bottom edge of the screen.</string>
<!-- Feedback shown during interactive parts of Home gesture tutorial when the Overview gesture is detected. [CHAR LIMIT=100] -->
@@ -146,7 +136,7 @@
<!-- Introduction title for the Overview gesture tutorial. [CHAR LIMIT=100] -->
<string name="overview_gesture_intro_title">Swipe to switch apps</string>
<!-- Introduction subtitle for the Overview gesture tutorial. [CHAR LIMIT=100] -->
- <string name="overview_gesture_intro_subtitle">Swipe up from the bottom of your screen, hold, then release.</string>
+ <string name="overview_gesture_intro_subtitle">To switch between apps, swipe up from the bottom of your screen, hold, then release.</string>
<!-- Title shown during interactive part of Assistant gesture tutorial. [CHAR LIMIT=30] -->
<string name="assistant_gesture_tutorial_playground_title" translatable="false">Tutorial: Assistant</string>
@@ -176,8 +166,8 @@
<!-- Title shown on the confirmation screen after successful gesture. [CHAR LIMIT=30] -->
<string name="gesture_tutorial_confirm_title">All set</string>
- <!-- Button text shown on a button on the feedback popup to proceed to the next tutorial step. [CHAR LIMIT=14] -->
- <string name="gesture_tutorial_action_button_label_next">Next</string>
+ <!-- Button text shown on a button on the feedback popup to complete the gesture tutorial. [CHAR LIMIT=14] -->
+ <string name="gesture_tutorial_action_button_label">Done</string>
<!-- Button text shown on a button to go to Settings. [CHAR LIMIT=14] -->
<string name="gesture_tutorial_action_button_label_settings">Settings</string>
<!-- Feedback title to try again. [CHAR LIMIT=30] -->
@@ -190,11 +180,11 @@
<!-- Title of "All Set" page [CHAR LIMIT=NONE] -->
<string name="allset_title">All set!</string>
<!-- Hint string at the bottom of "All Set" page [CHAR LIMIT=NONE] -->
- <string name="allset_hint">Swipe up to go home</string>
+ <string name="allset_hint">Swipe up to go Home</string>
<!-- Description of "All Set" page [CHAR LIMIT=NONE] -->
<string name="allset_description">You\u2019re ready to start using your phone</string>
<!-- String linking to navigation settings on "All Set" page [CHAR LIMIT=NONE] -->
- <string name="allset_navigation_settings"><annotation id="link">Navigation settings for accessibility</annotation></string>
+ <string name="allset_navigation_settings"><annotation id="link">System navigation settings</annotation></string>
<!-- ******* Overview ******* -->
<!-- Label for a button that causes the current overview app to be shared. [CHAR_LIMIT=40] -->
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index ca1e8c8..07c448d 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -41,10 +41,10 @@
parent="TextAppearance.GestureTutorial">
<item name="android:gravity">start</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
- <item name="android:fontFamily">google-sans-display</item>
+ <item name="android:fontFamily">google-sans-regular</item>
<item name="android:letterSpacing">0.03</item>
<item name="android:textSize">36sp</item>
- <item name="android:lineHeight">42sp</item>
+ <item name="android:lineHeight">44sp</item>
</style>
<style name="TextAppearance.GestureTutorial.Dialog.Title"
diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
index 06fd660..7340559 100644
--- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java
@@ -37,6 +37,7 @@
import com.android.quickstep.RecentsAnimationCallbacks;
import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener;
import com.android.quickstep.RecentsAnimationController;
+import com.android.quickstep.SystemUiProxy;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -152,6 +153,8 @@
TaskbarStashController stashController = mControllers.taskbarStashController;
stashController.animateToIsStashed(stashController.isStashedInApp(), duration);
}
+ SystemUiProxy.INSTANCE.get(mContext).notifyTaskbarStatus(!isResumed,
+ mControllers.taskbarStashController.isStashedInApp());
}
/**
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
index 788a36b..a226db9 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java
@@ -36,6 +36,7 @@
import com.android.launcher3.util.DisplayController.Info;
import com.android.quickstep.SysUINavigationMode;
import com.android.quickstep.SysUINavigationMode.Mode;
+import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.TouchInteractionService;
/**
@@ -127,16 +128,19 @@
private void recreateTaskbar() {
destroyExistingTaskbar();
- if (!FeatureFlags.ENABLE_TASKBAR.get()) {
+
+ DeviceProfile dp =
+ mUserUnlocked ? LauncherAppState.getIDP(mContext).getDeviceProfile(mContext) : null;
+
+ boolean isTaskBarEnabled =
+ FeatureFlags.ENABLE_TASKBAR.get() && dp != null && dp.isTaskbarPresent;
+
+ if (!isTaskBarEnabled) {
+ SystemUiProxy.INSTANCE.get(mContext)
+ .notifyTaskbarStatus(/* visible */ false, /* stashed */ false);
return;
}
- if (!mUserUnlocked) {
- return;
- }
- DeviceProfile dp = LauncherAppState.getIDP(mContext).getDeviceProfile(mContext);
- if (!dp.isTaskbarPresent) {
- return;
- }
+
mTaskbarActivityContext = new TaskbarActivityContext(
mContext, dp.copy(mContext), mNavButtonController);
mTaskbarActivityContext.init();
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
index 57600d7..6e20398 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java
@@ -28,6 +28,7 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
import com.android.quickstep.AnimatedFloat;
+import com.android.quickstep.SystemUiProxy;
/**
* Coordinates between controllers such as TaskbarViewController and StashedHandleViewController to
@@ -104,6 +105,9 @@
mIsStashedInApp = supportsStashing()
&& mPrefs.getBoolean(SHARED_PREFS_STASHED_KEY, DEFAULT_STASHED_PREF);
+
+ SystemUiProxy.INSTANCE.get(mActivity)
+ .notifyTaskbarStatus(/* visible */ true, /* stashed */ mIsStashedInApp);
}
/**
@@ -166,6 +170,8 @@
mPrefs.edit().putBoolean(SHARED_PREFS_STASHED_KEY, mIsStashedInApp).apply();
boolean isStashed = mIsStashedInApp;
if (wasStashed != isStashed) {
+ SystemUiProxy.INSTANCE.get(mActivity)
+ .notifyTaskbarStatus(/* visible */ true, /* stashed */ isStashed);
createAnimToIsStashed(isStashed, TASKBAR_STASH_DURATION).start();
return true;
}
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 096ac6c..bda2b77 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -115,7 +115,6 @@
import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
import com.android.systemui.shared.system.LatencyTrackerCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
-import com.android.systemui.shared.system.TaskInfoCompat;
import com.android.systemui.shared.system.TaskStackChangeListener;
import com.android.systemui.shared.system.TaskStackChangeListeners;
@@ -540,7 +539,7 @@
@Override
public void onMotionPauseDetected() {
mHasMotionEverBeenPaused = true;
- maybeUpdateRecentsAttachedState();
+ maybeUpdateRecentsAttachedState(true/* animate */, true/* moveFocusedTask */);
performHapticFeedback();
}
@@ -551,18 +550,24 @@
};
}
- public void maybeUpdateRecentsAttachedState() {
+ private void maybeUpdateRecentsAttachedState() {
maybeUpdateRecentsAttachedState(true /* animate */);
}
+ private void maybeUpdateRecentsAttachedState(boolean animate) {
+ maybeUpdateRecentsAttachedState(animate, false /* moveFocusedTask */);
+ }
+
/**
* Determines whether to show or hide RecentsView. The window is always
* synchronized with its corresponding TaskView in RecentsView, so if
* RecentsView is shown, it will appear to be attached to the window.
*
* Note this method has no effect unless the navigation mode is NO_BUTTON.
+ * @param animate whether to animate when attaching RecentsView
+ * @param moveFocusedTask whether to move focused task to front when attaching
*/
- private void maybeUpdateRecentsAttachedState(boolean animate) {
+ private void maybeUpdateRecentsAttachedState(boolean animate, boolean moveFocusedTask) {
if (!mDeviceState.isFullyGesturalNavMode() || mRecentsView == null) {
return;
}
@@ -581,6 +586,12 @@
} else {
recentsAttachedToAppWindow = mHasMotionEverBeenPaused || mIsLikelyToStartNewTask;
}
+ if (moveFocusedTask && !mAnimationFactory.hasRecentsEverAttachedToAppWindow()
+ && recentsAttachedToAppWindow) {
+ // Only move focused task if RecentsView has never been attached before, to avoid
+ // TaskView jumping to new position as we move the tasks.
+ mRecentsView.moveFocusedTaskToFront();
+ }
mAnimationFactory.setRecentsAttachedToAppWindow(recentsAttachedToAppWindow, animate);
// Reapply window transform throughout the attach animation, as the animation affects how
@@ -1026,9 +1037,6 @@
if (mRecentsView != null) {
int nearestPage = mRecentsView.getDestinationPage();
boolean isScrolling = false;
- // Update page scroll before snapping to page to make sure we snapped to the
- // position calculated with target gesture in mind.
- mRecentsView.updateScrollSynchronously();
if (mRecentsView.getNextPage() != nearestPage) {
// We shouldn't really scroll to the next page when swiping up to recents.
// Only allow settling on the next page if it's nearest to the center.
@@ -1110,7 +1118,8 @@
public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task,
boolean homeTaskVisible, boolean clearedTask, boolean wasVisible) {
if (task.taskId == mGestureState.getRunningTaskId()
- && TaskInfoCompat.getActivityType(task) != ACTIVITY_TYPE_HOME) {
+ && task.configuration.windowConfiguration.getActivityType()
+ != ACTIVITY_TYPE_HOME) {
// Since this is an edge case, just cancel and relaunch with default activity
// options (since we don't know if there's an associated app icon to launch from)
endRunningWindowAnim(true /* cancel */);
@@ -1152,8 +1161,7 @@
boolean appCanEnterPip = !mDeviceState.isPipActive()
&& runningTaskTarget != null
&& runningTaskTarget.taskInfo.pictureInPictureParams != null
- && TaskInfoCompat.isAutoEnterPipEnabled(
- runningTaskTarget.taskInfo.pictureInPictureParams);
+ && runningTaskTarget.taskInfo.pictureInPictureParams.isAutoEnterEnabled();
HomeAnimationFactory homeAnimFactory =
createHomeAnimationFactory(cookies, duration, isTranslucent, appCanEnterPip,
runningTaskTarget);
@@ -1187,7 +1195,8 @@
mLauncherTransitionController = null;
if (mRecentsView != null) {
- mRecentsView.onPrepareGestureEndAnimation(null, mGestureState.getEndTarget());
+ mRecentsView.onPrepareGestureEndAnimation(null, mGestureState.getEndTarget(),
+ mTaskViewSimulator);
}
} else {
AnimatorSet animatorSet = new AnimatorSet();
@@ -1229,7 +1238,7 @@
animatorSet.play(windowAnim);
if (mRecentsView != null) {
mRecentsView.onPrepareGestureEndAnimation(
- animatorSet, mGestureState.getEndTarget());
+ animatorSet, mGestureState.getEndTarget(), mTaskViewSimulator);
}
animatorSet.setDuration(duration).setInterpolator(interpolator);
animatorSet.start();
@@ -1254,7 +1263,7 @@
final Rect destinationBounds = SystemUiProxy.INSTANCE.get(mContext)
.startSwipePipToHome(taskInfo.topActivity,
- TaskInfoCompat.getTopActivityInfo(taskInfo),
+ taskInfo.topActivityInfo,
runningTaskTarget.taskInfo.pictureInPictureParams,
homeRotation,
mDp.hotseatBarSizePx);
@@ -1263,9 +1272,9 @@
.setTaskId(runningTaskTarget.taskId)
.setComponentName(taskInfo.topActivity)
.setLeash(runningTaskTarget.leash.getSurfaceControl())
- .setSourceRectHint(TaskInfoCompat.getPipSourceRectHint(
- runningTaskTarget.taskInfo.pictureInPictureParams))
- .setAppBounds(TaskInfoCompat.getWindowConfigurationBounds(taskInfo))
+ .setSourceRectHint(
+ runningTaskTarget.taskInfo.pictureInPictureParams.getSourceRectHint())
+ .setAppBounds(taskInfo.configuration.windowConfiguration.getBounds())
.setHomeToWindowPositionMap(homeToWindowPositionMap)
.setStartBounds(startRect)
.setDestinationBounds(destinationBounds)
@@ -1275,7 +1284,8 @@
// is not ROTATION_0 (which implies the rotation is turned on in launcher settings).
if (homeRotation == ROTATION_0
&& (windowRotation == ROTATION_90 || windowRotation == ROTATION_270)) {
- builder.setFromRotation(mTaskViewSimulator, windowRotation);
+ builder.setFromRotation(mTaskViewSimulator, windowRotation,
+ taskInfo.displayCutoutInsets);
}
final SwipePipToHomeAnimator swipePipToHomeAnimator = builder.build();
AnimatorPlaybackController activityAnimationToHome =
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index 1412b1a..389509f 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -396,6 +396,10 @@
default boolean isRecentsAttachedToAppWindow() {
return false;
}
+
+ default boolean hasRecentsEverAttachedToAppWindow() {
+ return false;
+ }
}
class DefaultAnimationFactory implements AnimationFactory {
@@ -405,6 +409,7 @@
private final Consumer<AnimatorControllerWithResistance> mCallback;
private boolean mIsAttachedToWindow;
+ private boolean mHasEverAttachedToWindow;
DefaultAnimationFactory(Consumer<AnimatorControllerWithResistance> callback) {
mCallback = callback;
@@ -458,6 +463,9 @@
}
mIsAttachedToWindow = attached;
RecentsView recentsView = mActivity.getOverviewPanel();
+ if (attached) {
+ mHasEverAttachedToWindow = true;
+ }
Animator fadeAnim = mActivity.getStateManager()
.createStateElementAnimation(INDEX_RECENTS_FADE_ANIM, attached ? 1 : 0);
@@ -487,6 +495,11 @@
return mIsAttachedToWindow;
}
+ @Override
+ public boolean hasRecentsEverAttachedToAppWindow() {
+ return mHasEverAttachedToWindow;
+ }
+
protected void createBackgroundToOverviewAnim(ACTIVITY_TYPE activity, PendingAnimation pa) {
// Scale down recents from being full screen to being in overview.
RecentsView recentsView = activity.getOverviewPanel();
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java
index d6b95c1..dac6981 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.java
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java
@@ -400,6 +400,18 @@
}
@Override
+ public void notifyTaskbarStatus(boolean visible, boolean stashed) {
+ if (mSystemUiProxy != null) {
+ try {
+ mSystemUiProxy.notifyTaskbarStatus(visible, stashed);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed call notifyTaskbarStatus with arg: " +
+ visible + ", " + stashed, e);
+ }
+ }
+ }
+
+ @Override
public void handleImageBundleAsScreenshot(Bundle screenImageBundle, Rect locationInScreen,
Insets visibleInsets, Task.TaskKey task) {
if (mSystemUiProxy != null) {
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java
index d963188..3bf79f1 100644
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java
@@ -36,6 +36,7 @@
import com.android.quickstep.FallbackActivityInterface;
import com.android.quickstep.GestureState;
import com.android.quickstep.RecentsActivity;
+import com.android.quickstep.util.TaskViewSimulator;
import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.SplitPlaceholderView;
@@ -89,8 +90,9 @@
*/
@Override
public void onPrepareGestureEndAnimation(
- @Nullable AnimatorSet animatorSet, GestureState.GestureEndTarget endTarget) {
- super.onPrepareGestureEndAnimation(animatorSet, endTarget);
+ @Nullable AnimatorSet animatorSet, GestureState.GestureEndTarget endTarget,
+ TaskViewSimulator taskViewSimulator) {
+ super.onPrepareGestureEndAnimation(animatorSet, endTarget, taskViewSimulator);
if (mHomeTaskInfo != null && endTarget == RECENTS && animatorSet != null) {
TaskView tv = getTaskView(mHomeTaskInfo.taskId);
if (tv != null) {
diff --git a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
index a06f903..3cb22f4 100644
--- a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
@@ -15,9 +15,8 @@
*/
package com.android.quickstep.interaction;
+import static com.android.quickstep.interaction.TutorialController.TutorialType.BACK_NAVIGATION;
import static com.android.quickstep.interaction.TutorialController.TutorialType.BACK_NAVIGATION_COMPLETE;
-import static com.android.quickstep.interaction.TutorialController.TutorialType.LEFT_EDGE_BACK_NAVIGATION;
-import static com.android.quickstep.interaction.TutorialController.TutorialType.RIGHT_EDGE_BACK_NAVIGATION;
import android.graphics.PointF;
@@ -36,15 +35,12 @@
@Override
public Integer getIntroductionTitle() {
- return mTutorialType == LEFT_EDGE_BACK_NAVIGATION
- ? R.string.back_left_gesture_intro_title : R.string.back_right_gesture_intro_title;
+ return R.string.back_gesture_intro_title;
}
@Override
public Integer getIntroductionSubtitle() {
- return mTutorialType == LEFT_EDGE_BACK_NAVIGATION
- ? R.string.back_left_gesture_intro_subtitle
- : R.string.back_right_gesture_intro_subtitle;
+ return R.string.back_gesture_intro_subtitle;
}
@Override
@@ -58,11 +54,8 @@
return;
}
switch (mTutorialType) {
- case RIGHT_EDGE_BACK_NAVIGATION:
- handleAttemptFromRight(result);
- break;
- case LEFT_EDGE_BACK_NAVIGATION:
- handleAttemptFromLeft(result);
+ case BACK_NAVIGATION:
+ handleBackAttempt(result);
break;
case BACK_NAVIGATION_COMPLETE:
if (result == BackGestureResult.BACK_COMPLETED_FROM_LEFT
@@ -73,8 +66,9 @@
}
}
- private void handleAttemptFromRight(BackGestureResult result) {
+ private void handleBackAttempt(BackGestureResult result) {
switch (result) {
+ case BACK_COMPLETED_FROM_LEFT:
case BACK_COMPLETED_FROM_RIGHT:
mTutorialFragment.releaseGestureVideoView();
hideFeedback(true);
@@ -85,39 +79,12 @@
: R.string.back_gesture_feedback_complete_with_overview_follow_up;
showFeedback(subtitleResId, true);
break;
- case BACK_CANCELLED_FROM_RIGHT:
- showFeedback(R.string.back_gesture_feedback_cancelled_right_edge);
- break;
- case BACK_COMPLETED_FROM_LEFT:
case BACK_CANCELLED_FROM_LEFT:
- case BACK_NOT_STARTED_TOO_FAR_FROM_EDGE:
- showFeedback(R.string.back_gesture_feedback_swipe_too_far_from_right_edge);
- break;
- case BACK_NOT_STARTED_IN_NAV_BAR_REGION:
- showFeedback(R.string.back_gesture_feedback_swipe_in_nav_bar);
- break;
- }
- }
-
- private void handleAttemptFromLeft(BackGestureResult result) {
- switch (result) {
- case BACK_COMPLETED_FROM_LEFT:
- mTutorialFragment.releaseGestureVideoView();
- hideFeedback(true);
- mFakeTaskView.setBackground(AppCompatResources.getDrawable(mContext,
- R.drawable.mock_conversations_list));
- int subtitleResId = mTutorialFragment.isAtFinalStep()
- ? R.string.back_gesture_feedback_complete_without_follow_up
- : R.string.back_gesture_feedback_complete_with_back_right_follow_up;
- showFeedback(subtitleResId, true);
- break;
- case BACK_CANCELLED_FROM_LEFT:
- showFeedback(R.string.back_gesture_feedback_cancelled_left_edge);
- break;
- case BACK_COMPLETED_FROM_RIGHT:
case BACK_CANCELLED_FROM_RIGHT:
+ showFeedback(R.string.back_gesture_feedback_cancelled);
+ break;
case BACK_NOT_STARTED_TOO_FAR_FROM_EDGE:
- showFeedback(R.string.back_gesture_feedback_swipe_too_far_from_left_edge);
+ showFeedback(R.string.back_gesture_feedback_swipe_too_far_from_edge);
break;
case BACK_NOT_STARTED_IN_NAV_BAR_REGION:
showFeedback(R.string.back_gesture_feedback_swipe_in_nav_bar);
@@ -134,8 +101,7 @@
if (result == NavBarGestureResult.HOME_GESTURE_COMPLETED) {
mTutorialFragment.closeTutorial();
}
- } else if (mTutorialType == LEFT_EDGE_BACK_NAVIGATION
- || mTutorialType == RIGHT_EDGE_BACK_NAVIGATION) {
+ } else if (mTutorialType == BACK_NAVIGATION) {
showFeedback(R.string.back_gesture_feedback_swipe_in_nav_bar);
}
}
diff --git a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java
index 9b6afd6..1740f68 100644
--- a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java
+++ b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialFragment.java
@@ -28,17 +28,13 @@
@Nullable
@Override
Integer getFeedbackVideoResId(boolean forDarkMode) {
- return mTutorialType == TutorialType.RIGHT_EDGE_BACK_NAVIGATION
- ? R.drawable.gesture_tutorial_motion_back_right
- : R.drawable.gesture_tutorial_motion_back_left;
+ return R.drawable.gesture_tutorial_motion_back;
}
@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;
+ return R.drawable.gesture_tutorial_loop_back;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java b/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java
index bc49133..7fb7d29 100644
--- a/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java
@@ -141,7 +141,7 @@
}
private TutorialType[] getTutorialSteps(Bundle extras) {
- TutorialType[] defaultSteps = new TutorialType[] {TutorialType.LEFT_EDGE_BACK_NAVIGATION};
+ TutorialType[] defaultSteps = new TutorialType[] {TutorialType.BACK_NAVIGATION};
mCurrentStep = 1;
mNumSteps = 1;
diff --git a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
index 83ce315..819c91c 100644
--- a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
@@ -82,7 +82,6 @@
case HOME_GESTURE_COMPLETED: {
mTutorialFragment.releaseGestureVideoView();
animateFakeTaskViewHome(finalVelocity, null);
- showActionButton();
int subtitleResId = mTutorialFragment.isAtFinalStep()
? R.string.home_gesture_feedback_complete_without_follow_up
: R.string.home_gesture_feedback_complete_with_follow_up;
diff --git a/quickstep/src/com/android/quickstep/interaction/SandboxModeTutorialController.java b/quickstep/src/com/android/quickstep/interaction/SandboxModeTutorialController.java
index 4e4b81a..19b7933 100644
--- a/quickstep/src/com/android/quickstep/interaction/SandboxModeTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/SandboxModeTutorialController.java
@@ -36,11 +36,9 @@
showRippleEffect(null);
showFeedback(R.string.sandbox_mode_back_gesture_feedback_successful);
break;
- case BACK_CANCELLED_FROM_RIGHT:
- showFeedback(R.string.back_gesture_feedback_cancelled_right_edge);
- break;
case BACK_CANCELLED_FROM_LEFT:
- showFeedback(R.string.back_gesture_feedback_cancelled_left_edge);
+ case BACK_CANCELLED_FROM_RIGHT:
+ showFeedback(R.string.back_gesture_feedback_cancelled);
break;
case BACK_NOT_STARTED_TOO_FAR_FROM_EDGE:
showFeedback(R.string.sandbox_mode_back_gesture_feedback_swipe_too_far_from_edge);
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index dfe0c72..4b4e7e6 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -59,6 +59,7 @@
private static final int FEEDBACK_ANIMATION_MS = 250;
private static final int RIPPLE_VISIBLE_MS = 300;
private static final int GESTURE_ANIMATION_DELAY_MS = 1500;
+ private static final int ADVANCE_TUTORIAL_TIMEOUT_MS = 4000;
final TutorialFragment mTutorialFragment;
TutorialType mTutorialType;
@@ -220,7 +221,15 @@
mFeedbackView.findViewById(R.id.gesture_tutorial_fragment_feedback_subtitle);
subtitle.setText(subtitleResId);
if (isGestureSuccessful) {
- showActionButton();
+ hideCloseButton();
+ if (mTutorialFragment.isAtFinalStep()) {
+ showActionButton();
+ }
+
+ if (mFeedbackVideoViewCallback != null) {
+ mFeedbackVideoView.removeCallbacks(mFeedbackVideoViewCallback);
+ mFeedbackVideoViewCallback = null;
+ }
}
mGestureCompleted = isGestureSuccessful;
@@ -248,6 +257,16 @@
mFeedbackView.animate()
.setDuration(FEEDBACK_ANIMATION_MS)
.translationY(0)
+ .withEndAction(() -> {
+ if (isGestureSuccessful && !mTutorialFragment.isAtFinalStep()) {
+ if (mFeedbackViewCallback != null) {
+ mFeedbackView.removeCallbacks(mFeedbackViewCallback);
+ }
+ mFeedbackViewCallback = mTutorialFragment::continueTutorial;
+ mFeedbackView.postDelayed(mFeedbackViewCallback,
+ ADVANCE_TUTORIAL_TIMEOUT_MS);
+ }
+ })
.start();
mFeedbackTitleView.postDelayed(mTitleViewCallback, FEEDBACK_ANIMATION_MS);
}
@@ -352,19 +371,26 @@
}
}
- void hideActionButton() {
+ void hideCloseButton() {
+ mCloseButton.setVisibility(GONE);
+ }
+
+ void showCloseButton() {
mCloseButton.setVisibility(View.VISIBLE);
mCloseButton.setTextAppearance(Utilities.isDarkTheme(mContext)
? R.style.TextAppearance_GestureTutorial_Feedback_Subtext
: R.style.TextAppearance_GestureTutorial_Feedback_Subtext_Dark);
+ }
+ void hideActionButton() {
+ showCloseButton();
// Invisible to maintain the layout.
mActionButton.setVisibility(View.INVISIBLE);
mActionButton.setOnClickListener(null);
}
void showActionButton() {
- mCloseButton.setVisibility(GONE);
+ hideCloseButton();
mActionButton.setVisibility(View.VISIBLE);
mActionButton.setOnClickListener(this::onActionButtonClicked);
}
@@ -461,8 +487,7 @@
/** Denotes the type of the tutorial. */
enum TutorialType {
- RIGHT_EDGE_BACK_NAVIGATION,
- LEFT_EDGE_BACK_NAVIGATION,
+ BACK_NAVIGATION,
BACK_NAVIGATION_COMPLETE,
HOME_NAVIGATION,
HOME_NAVIGATION_COMPLETE,
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java
index da0fc66..7637450 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java
@@ -64,7 +64,7 @@
TutorialFragment fragment = getFragmentForTutorialType(tutorialType);
if (fragment == null) {
fragment = new BackGestureTutorialFragment();
- tutorialType = TutorialType.RIGHT_EDGE_BACK_NAVIGATION;
+ tutorialType = TutorialType.BACK_NAVIGATION;
}
Bundle args = new Bundle();
@@ -76,8 +76,7 @@
@Nullable
private static TutorialFragment getFragmentForTutorialType(TutorialType tutorialType) {
switch (tutorialType) {
- case RIGHT_EDGE_BACK_NAVIGATION:
- case LEFT_EDGE_BACK_NAVIGATION:
+ case BACK_NAVIGATION:
case BACK_NAVIGATION_COMPLETE:
return new BackGestureTutorialFragment();
case HOME_NAVIGATION:
diff --git a/quickstep/src/com/android/quickstep/logging/SettingsChangeLogger.java b/quickstep/src/com/android/quickstep/logging/SettingsChangeLogger.java
index 7eca360..6bdc284 100644
--- a/quickstep/src/com/android/quickstep/logging/SettingsChangeLogger.java
+++ b/quickstep/src/com/android/quickstep/logging/SettingsChangeLogger.java
@@ -16,7 +16,7 @@
package com.android.quickstep.logging;
-import static com.android.launcher3.InvariantDeviceProfile.KEY_MIGRATION_SRC_HOTSEAT_COUNT;
+import static com.android.launcher3.InvariantDeviceProfile.KEY_MIGRATION_SRC_WORKSPACE_SIZE;
import static com.android.launcher3.Utilities.getDevicePrefs;
import static com.android.launcher3.Utilities.getPrefs;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_GRID_SIZE_2;
@@ -43,6 +43,7 @@
import com.android.launcher3.AutoInstallsLayout;
import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.InstanceIdSequence;
import com.android.launcher3.logging.StatsLogManager;
@@ -133,7 +134,8 @@
@Override
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
- if (LAST_PREDICTION_ENABLED_STATE.equals(key) || KEY_MIGRATION_SRC_HOTSEAT_COUNT.equals(key)
+ if (LAST_PREDICTION_ENABLED_STATE.equals(key)
+ || KEY_MIGRATION_SRC_WORKSPACE_SIZE.equals(key)
|| mLoggablePrefs.containsKey(key)) {
dispatchUserEvent();
}
@@ -153,23 +155,25 @@
SharedPreferences prefs = getPrefs(mContext);
StatsLogManager.LauncherEvent gridSizeChangedEvent = null;
- // TODO(b/184981523): This doesn't work for 2-panel grid, which has 6 hotseat icons
- switch (prefs.getInt(KEY_MIGRATION_SRC_HOTSEAT_COUNT, -1)) {
- case 5:
- gridSizeChangedEvent = LAUNCHER_GRID_SIZE_5;
- break;
- case 4:
- gridSizeChangedEvent = LAUNCHER_GRID_SIZE_4;
- break;
- case 3:
- gridSizeChangedEvent = LAUNCHER_GRID_SIZE_3;
- break;
- case 2:
- gridSizeChangedEvent = LAUNCHER_GRID_SIZE_2;
- break;
- default:
- // Ignore illegal input.
- break;
+ String workspaceSize = prefs.getString(KEY_MIGRATION_SRC_WORKSPACE_SIZE, null);
+ if (workspaceSize != null) {
+ switch (Utilities.parsePoint(workspaceSize).x) {
+ case 5:
+ gridSizeChangedEvent = LAUNCHER_GRID_SIZE_5;
+ break;
+ case 4:
+ gridSizeChangedEvent = LAUNCHER_GRID_SIZE_4;
+ break;
+ case 3:
+ gridSizeChangedEvent = LAUNCHER_GRID_SIZE_3;
+ break;
+ case 2:
+ gridSizeChangedEvent = LAUNCHER_GRID_SIZE_2;
+ break;
+ default:
+ // Ignore illegal input.
+ break;
+ }
}
if (gridSizeChangedEvent != null) {
logger.log(gridSizeChangedEvent);
diff --git a/quickstep/src/com/android/quickstep/util/AssistantUtilities.java b/quickstep/src/com/android/quickstep/util/AssistantUtilities.java
index 552db1f..336f7d1 100644
--- a/quickstep/src/com/android/quickstep/util/AssistantUtilities.java
+++ b/quickstep/src/com/android/quickstep/util/AssistantUtilities.java
@@ -23,7 +23,6 @@
import android.os.Build;
import com.android.systemui.shared.system.ActivityManagerWrapper;
-import com.android.systemui.shared.system.TaskInfoCompat;
/**
* Utility class for interacting with the Assistant.
@@ -39,7 +38,7 @@
/** Returns true if the given task holds an Assistant activity that is excluded from recents. */
public static boolean isExcludedAssistant(TaskInfo info) {
return info != null
- && TaskInfoCompat.getActivityType(info) == ACTIVITY_TYPE_ASSISTANT
+ && info.configuration.windowConfiguration.getActivityType() == ACTIVITY_TYPE_ASSISTANT
&& (info.baseIntent.getFlags() & Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) != 0;
}
diff --git a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
index 7488649..c0f5c14 100644
--- a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
+++ b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
@@ -301,6 +301,7 @@
private ComponentName mComponentName;
private SurfaceControl mLeash;
private Rect mSourceRectHint;
+ private Rect mDisplayCutoutInsets;
private Rect mAppBounds;
private Matrix mHomeToWindowPositionMap;
private RectF mStartBounds;
@@ -366,7 +367,8 @@
}
public Builder setFromRotation(TaskViewSimulator taskViewSimulator,
- @RecentsOrientedState.SurfaceRotation int fromRotation) {
+ @RecentsOrientedState.SurfaceRotation int fromRotation,
+ Rect displayCutoutInsets) {
if (fromRotation != Surface.ROTATION_90 && fromRotation != Surface.ROTATION_270) {
Log.wtf(TAG, "Not a supported rotation, rotation=" + fromRotation);
return this;
@@ -381,6 +383,9 @@
transformed.round(mDestinationBoundsTransformed);
mFromRotation = fromRotation;
+ if (displayCutoutInsets != null) {
+ mDisplayCutoutInsets = new Rect(displayCutoutInsets);
+ }
return this;
}
@@ -388,6 +393,14 @@
if (mDestinationBoundsTransformed.isEmpty()) {
mDestinationBoundsTransformed.set(mDestinationBounds);
}
+ // adjust the mSourceRectHint / mAppBounds by display cutout if applicable.
+ if (mSourceRectHint != null && mDisplayCutoutInsets != null) {
+ if (mFromRotation == Surface.ROTATION_90) {
+ mSourceRectHint.offset(mDisplayCutoutInsets.left, mDisplayCutoutInsets.top);
+ } else if (mFromRotation == Surface.ROTATION_270) {
+ mAppBounds.inset(mDisplayCutoutInsets);
+ }
+ }
return new SwipePipToHomeAnimator(mContext, mTaskId, mComponentName, mLeash,
mSourceRectHint, mAppBounds,
mHomeToWindowPositionMap, mStartBounds, mDestinationBounds,
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 6d3f855..9d10b54 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -1111,6 +1111,35 @@
}
}
+ /**
+ * Moves the focused task to the front of the carousel in tablets, to minimize animation
+ * required to focus the task in grid.
+ */
+ public void moveFocusedTaskToFront() {
+ if (!(mActivity.getDeviceProfile().isTablet && FeatureFlags.ENABLE_OVERVIEW_GRID.get())) {
+ return;
+ }
+
+ TaskView focusedTaskView = getFocusedTaskView();
+ if (focusedTaskView == null) {
+ return;
+ }
+
+ if (indexOfChild(focusedTaskView) != mCurrentPage) {
+ return;
+ }
+
+ int primaryScroll = mOrientationHandler.getPrimaryScroll(this);
+ int currentPageScroll = getScrollForPage(mCurrentPage);
+ mCurrentPageScrollDiff = primaryScroll - currentPageScroll;
+
+ removeView(focusedTaskView);
+ addView(focusedTaskView, mTaskViewStartIndex);
+ setCurrentPage(0);
+
+ updateGridProperties();
+ }
+
protected void applyLoadPlan(ArrayList<Task> tasks) {
if (mPendingAnimation != null) {
mPendingAnimation.addEndListener(success -> applyLoadPlan(tasks));
@@ -1158,7 +1187,9 @@
final TaskView taskView = (TaskView) getChildAt(pageIndex);
taskView.bind(task, mOrientationState);
}
- if (mFocusedTaskId == -1 && getTaskViewCount() > 0) {
+
+ // If the list changed, maybe the focused task doesn't exist anymore
+ if (getFocusedTaskView() == null && getTaskViewCount() > 0) {
mFocusedTaskId = getTaskViewAt(0).getTaskId();
}
updateTaskSize();
@@ -1767,24 +1798,33 @@
* Called when a gesture from an app has finished, and an end target has been determined.
*/
public void onPrepareGestureEndAnimation(
- @Nullable AnimatorSet animatorSet, GestureState.GestureEndTarget endTarget) {
+ @Nullable AnimatorSet animatorSet, GestureState.GestureEndTarget endTarget,
+ TaskViewSimulator taskViewSimulator) {
+ mCurrentGestureEndTarget = endTarget;
+ if (endTarget == GestureState.GestureEndTarget.RECENTS) {
+ setEnableFreeScroll(true);
+ updateGridProperties();
+ }
+
if (mSizeStrategy.stateFromGestureEndTarget(endTarget)
.displayOverviewTasksAsGrid(mActivity.getDeviceProfile())) {
+ TaskView runningTaskView = getRunningTaskView();
+ float runningTaskPrimaryGridTranslation = 0;
+ if (indexOfChild(runningTaskView) != getNextPage()) {
+ // Apply the gird translation to running task unless it's being snapped to.
+ runningTaskPrimaryGridTranslation = mOrientationHandler.getPrimaryValue(
+ runningTaskView.getGridTranslationX(),
+ runningTaskView.getGridTranslationY());
+ }
if (animatorSet == null) {
setGridProgress(1);
+ taskViewSimulator.taskPrimaryTranslation.value = runningTaskPrimaryGridTranslation;
} else {
animatorSet.play(ObjectAnimator.ofFloat(this, RECENTS_GRID_PROGRESS, 1));
+ animatorSet.play(taskViewSimulator.taskPrimaryTranslation.animateToValue(
+ runningTaskPrimaryGridTranslation));
}
}
- mCurrentGestureEndTarget = endTarget;
- if (endTarget == GestureState.GestureEndTarget.NEW_TASK
- || endTarget == GestureState.GestureEndTarget.LAST_TASK) {
- // When switching to tasks in quick switch, ensures the snapped page's scroll maintain
- // invariant between quick switch and overview, to ensure a smooth animation transition.
- updateGridProperties();
- } else if (endTarget == GestureState.GestureEndTarget.RECENTS) {
- setEnableFreeScroll(true);
- }
}
/**
@@ -2071,12 +2111,6 @@
snappedTaskGridTranslationX = gridTranslations[snappedPage - mTaskViewStartIndex];
}
- for (int i = 0; i < taskCount; i++) {
- TaskView taskView = getTaskViewAt(i);
- taskView.setGridTranslationX(gridTranslations[i] - snappedTaskGridTranslationX
- + snappedTaskNonGridScrollAdjustment);
- }
-
// Use the accumulated translation of the row containing the last task.
float clearAllAccumulatedTranslation = topSet.contains(taskCount - 1)
? topAccumulatedTranslationX : bottomAccumulatedTranslationX;
@@ -2119,17 +2153,23 @@
// Make sure there are enough space between snapped page and ClearAllButton, for the case
// of swiping up after quick switch.
if (snappedTaskView != null) {
- int distanceFromClearAll = longRowWidth - snappedTaskRowWidth;
+ int distanceFromClearAll = longRowWidth - snappedTaskRowWidth + mPageSpacing;
// ClearAllButton should be off screen when snapped task is in its snapped position.
int minimumDistance =
mTaskWidth - snappedTaskView.getLayoutParams().width
+ (mLastComputedGridSize.width() - mTaskWidth) / 2;
if (distanceFromClearAll < minimumDistance) {
int distanceDifference = minimumDistance - distanceFromClearAll;
- clearAllTotalTranslationX += mIsRtl ? -distanceDifference : distanceDifference;
+ snappedTaskGridTranslationX += mIsRtl ? distanceDifference : -distanceDifference;
}
}
+ for (int i = 0; i < taskCount; i++) {
+ TaskView taskView = getTaskViewAt(i);
+ taskView.setGridTranslationX(gridTranslations[i] - snappedTaskGridTranslationX
+ + snappedTaskNonGridScrollAdjustment);
+ }
+
mClearAllButton.setGridTranslationPrimary(
clearAllTotalTranslationX - snappedTaskGridTranslationX);
mClearAllButton.setGridScrollOffset(
@@ -2860,6 +2900,7 @@
mLastComputedTaskStartPushOutDistance = null;
mLastComputedTaskEndPushOutDistance = null;
updatePageOffsets();
+ mLiveTileTaskViewSimulator.setScroll(getScrollOffset());
setImportantForAccessibility(isModal() ? IMPORTANT_FOR_ACCESSIBILITY_NO
: IMPORTANT_FOR_ACCESSIBILITY_AUTO);
}
@@ -3622,18 +3663,28 @@
}
boolean pageScrollChanged = false;
- final int childCount = getChildCount();
- for (int i = 0; i < childCount; i++) {
- View child = getChildAt(i);
- float scrollDiff = 0;
- if (child instanceof TaskView) {
- scrollDiff = ((TaskView) child).getScrollAdjustment(showAsFullscreen, showAsGrid);
- } else if (child instanceof ClearAllButton) {
- scrollDiff = ((ClearAllButton) child).getScrollAdjustment(showAsFullscreen,
- showAsGrid);
- }
- final int pageScroll = newPageScrolls[i] + (int) scrollDiff;
+ int clearAllIndex = indexOfChild(mClearAllButton);
+ int clearAllScroll = 0;
+ int clearAllWidth = mOrientationHandler.getPrimarySize(mClearAllButton);
+ if (clearAllIndex != -1 && clearAllIndex < outPageScrolls.length) {
+ float scrollDiff = mClearAllButton.getScrollAdjustment(showAsFullscreen, showAsGrid);
+ clearAllScroll = newPageScrolls[clearAllIndex] + (int) scrollDiff;
+ if (outPageScrolls[clearAllIndex] != clearAllScroll) {
+ pageScrollChanged = true;
+ outPageScrolls[clearAllIndex] = clearAllScroll;
+ }
+ }
+
+ final int taskCount = getTaskViewCount();
+ for (int i = 0; i < taskCount; i++) {
+ TaskView taskView = getTaskViewAt(i);
+ float scrollDiff = taskView.getScrollAdjustment(showAsFullscreen, showAsGrid);
+ int pageScroll = newPageScrolls[i + mTaskViewStartIndex] + (int) scrollDiff;
+ if ((mIsRtl && pageScroll < clearAllScroll)
+ || (!mIsRtl && pageScroll > clearAllScroll)) {
+ pageScroll = clearAllScroll + (mIsRtl ? clearAllWidth : -clearAllWidth);
+ }
if (outPageScrolls[i] != pageScroll) {
pageScrollChanged = true;
outPageScrolls[i] = pageScroll;
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index 9a6eda4..c14a590 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -145,12 +145,8 @@
launcher -> assertEquals("Dismissing a task didn't remove 1 task from Overview",
numTasks - 1, getTaskCount(launcher)));
- // Test UIDevice.pressHome, once we are in AllApps.
- mDevice.pressHome();
- waitForState("Launcher internal state didn't switch to Home", () -> LauncherState.NORMAL);
-
// Test dismissing all tasks.
- mLauncher.getWorkspace().switchToOverview().dismissAllTasks();
+ mLauncher.pressHome().switchToOverview().dismissAllTasks();
waitForState("Launcher internal state didn't switch to Home", () -> LauncherState.NORMAL);
executeOnLauncher(
launcher -> assertEquals("Still have tasks after dismissing all",
diff --git a/res/drawable/padded_rounded_action_button.xml b/res/drawable/padded_rounded_action_button.xml
index 900f5fc..6432efd 100644
--- a/res/drawable/padded_rounded_action_button.xml
+++ b/res/drawable/padded_rounded_action_button.xml
@@ -16,14 +16,15 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
- <item android:bottom="8dp" android:top="8dp">
+ <item
+ android:left="@dimen/padded_rounded_button_padding"
+ android:top="@dimen/padded_rounded_button_padding"
+ android:right="@dimen/padded_rounded_button_padding"
+ android:bottom="@dimen/padded_rounded_button_padding">
<shape android:shape="rectangle">
-
- <corners android:radius="@dimen/rounded_button_radius" />
- <stroke android:width="1dp" android:color="?androidprv:attr/colorAccentPrimaryVariant" />
- <padding
- android:left="@dimen/rounded_button_padding"
- android:right="@dimen/rounded_button_padding" />
+ <corners android:radius="@dimen/rounded_button_radius" />
+ <stroke android:width="1dp"
+ android:color="?androidprv:attr/colorAccentPrimaryVariant" />
</shape>
</item>
</layer-list>
diff --git a/res/layout/launcher_preview_two_panel_layout.xml b/res/layout/launcher_preview_two_panel_layout.xml
new file mode 100644
index 0000000..7b227e0
--- /dev/null
+++ b/res/layout/launcher_preview_two_panel_layout.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<view class="com.android.launcher3.graphics.LauncherPreviewRenderer$LauncherPreviewLayout"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="false">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.launcher3.CellLayout
+ android:id="@+id/workspace_left"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:theme="@style/HomeScreenElementTheme"
+ launcher:containerType="workspace"
+ launcher:layout_constraintStart_toStartOf="parent"
+ launcher:layout_constraintTop_toTopOf="parent"
+ launcher:layout_constraintEnd_toStartOf="@id/workspace"
+ launcher:layout_constraintBottom_toBottomOf="parent"
+ launcher:pageIndicator="@+id/page_indicator" />
+
+ <com.android.launcher3.CellLayout
+ android:id="@+id/workspace"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:theme="@style/HomeScreenElementTheme"
+ launcher:containerType="workspace"
+ launcher:layout_constraintStart_toEndOf="@id/workspace_left"
+ launcher:layout_constraintTop_toTopOf="parent"
+ launcher:layout_constraintEnd_toEndOf="parent"
+ launcher:layout_constraintBottom_toBottomOf="parent"
+ launcher:pageIndicator="@+id/page_indicator" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <include
+ android:id="@+id/hotseat"
+ layout="@layout/hotseat" />
+
+</view>
\ No newline at end of file
diff --git a/res/layout/work_apps_edu.xml b/res/layout/work_apps_edu.xml
index 382b8fc..1517087 100644
--- a/res/layout/work_apps_edu.xml
+++ b/res/layout/work_apps_edu.xml
@@ -43,7 +43,7 @@
<Button
android:layout_width="match_parent"
- android:layout_height="52dp"
+ android:layout_height="@dimen/work_card_button_height"
android:id="@+id/action_btn"
android:textColor="?attr/workProfileOverlayTextColor"
android:text="@string/work_profile_edu_accept"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c9557ef..46570f0 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -122,6 +122,7 @@
<dimen name="work_fab_height">56dp</dimen>
<dimen name="work_fab_radius">28dp</dimen>
<dimen name="work_card_padding_horizontal">24dp</dimen>
+ <dimen name="work_card_button_height">52dp</dimen>
<dimen name="work_fab_margin">16dp</dimen>
<dimen name="work_profile_footer_padding">20dp</dimen>
<dimen name="work_profile_footer_text_size">16sp</dimen>
@@ -333,4 +334,5 @@
<!-- Search results related parameters -->
<dimen name="search_row_icon_size">48dp</dimen>
<dimen name="search_row_small_icon_size">32dp</dimen>
+ <dimen name="padded_rounded_button_padding">8dp</dimen>
</resources>
diff --git a/robolectric_tests/src/com/android/launcher3/model/GridSizeMigrationTaskV2Test.java b/robolectric_tests/src/com/android/launcher3/model/GridSizeMigrationTaskV2Test.java
index 8e49fae..d2051e0 100644
--- a/robolectric_tests/src/com/android/launcher3/model/GridSizeMigrationTaskV2Test.java
+++ b/robolectric_tests/src/com/android/launcher3/model/GridSizeMigrationTaskV2Test.java
@@ -131,7 +131,7 @@
mIdp.numDatabaseHotseatIcons);
GridSizeMigrationTaskV2 task = new GridSizeMigrationTaskV2(mContext, mDb, srcReader,
destReader, mIdp.numDatabaseHotseatIcons, new Point(mIdp.numColumns, mIdp.numRows));
- task.migrate();
+ task.migrate(mIdp);
// Check hotseat items
Cursor c = mContext.getContentResolver().query(LauncherSettings.Favorites.CONTENT_URI,
@@ -211,7 +211,7 @@
mIdp.numDatabaseHotseatIcons);
GridSizeMigrationTaskV2 task = new GridSizeMigrationTaskV2(mContext, mDb, srcReader,
destReader, mIdp.numDatabaseHotseatIcons, new Point(mIdp.numColumns, mIdp.numRows));
- task.migrate();
+ task.migrate(mIdp);
// Check hotseat items
Cursor c = mContext.getContentResolver().query(LauncherSettings.Favorites.CONTENT_URI,
@@ -259,7 +259,7 @@
mIdp.numDatabaseHotseatIcons);
GridSizeMigrationTaskV2 task = new GridSizeMigrationTaskV2(mContext, mDb, srcReader,
destReader, mIdp.numDatabaseHotseatIcons, new Point(mIdp.numColumns, mIdp.numRows));
- task.migrate();
+ task.migrate(mIdp);
// Check hotseat items
Cursor c = mContext.getContentResolver().query(LauncherSettings.Favorites.CONTENT_URI,
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index 9a5f3f2..2c84a3d 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -109,7 +109,8 @@
pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_EMPTY_SEARCH, 1);
pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ALL_APPS_DIVIDER, 1);
pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_SEARCH_MARKET, 1);
- pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ICON, approxRows * mNumAppsPerRow);
+ pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ICON, approxRows
+ * (mNumAppsPerRow + 1));
mViewHeights.clear();
mViewHeights.put(AllAppsGridAdapter.VIEW_TYPE_ICON, grid.allAppsCellHeightPx);
diff --git a/src/com/android/launcher3/dragndrop/AddItemActivity.java b/src/com/android/launcher3/dragndrop/AddItemActivity.java
index 905a701..55be4a4 100644
--- a/src/com/android/launcher3/dragndrop/AddItemActivity.java
+++ b/src/com/android/launcher3/dragndrop/AddItemActivity.java
@@ -278,7 +278,7 @@
@Override
protected void onPostExecute(WidgetItem item) {
- mWidgetCell.setPreviewSize(item.spanX, item.spanY);
+ mWidgetCell.setPreviewSize(item);
mWidgetCell.applyFromCellItem(item, mApp.getWidgetCache());
mWidgetCell.ensurePreview();
}
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java
index 1f93730..f2ab96c 100644
--- a/src/com/android/launcher3/dragndrop/DragView.java
+++ b/src/com/android/launcher3/dragndrop/DragView.java
@@ -148,6 +148,12 @@
addView(content, new LayoutParams(width, height));
+ // If there is already a scale set on the content, we don't want to clip the children.
+ if (content.getScaleX() != 1 || content.getScaleY() != 1) {
+ setClipChildren(false);
+ setClipToPadding(false);
+ }
+
final float scale = (width + finalScaleDps) / width;
// Set the initial scale to avoid any jumps
diff --git a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
index 1127ff9..1da8028 100644
--- a/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
+++ b/src/com/android/launcher3/graphics/LauncherPreviewRenderer.java
@@ -208,7 +208,7 @@
private final LayoutInflater mHomeElementInflater;
private final InsettableFrameLayout mRootView;
private final Hotseat mHotseat;
- private final CellLayout mWorkspace;
+ private final Map<Integer, CellLayout> mWorkspaceScreens = new HashMap<>();
private final AppWidgetHost mAppWidgetHost;
private final SparseIntArray mWallpaperColorResources;
@@ -254,19 +254,31 @@
new ContextThemeWrapper(this, R.style.HomeScreenElementTheme));
mHomeElementInflater.setFactory2(this);
+ int layoutRes = mDp.isTwoPanels ? R.layout.launcher_preview_two_panel_layout
+ : R.layout.launcher_preview_layout;
mRootView = (InsettableFrameLayout) mHomeElementInflater.inflate(
- R.layout.launcher_preview_layout, null, false);
+ layoutRes, null, false);
mRootView.setInsets(mInsets);
measureView(mRootView, mDp.widthPx, mDp.heightPx);
mHotseat = mRootView.findViewById(R.id.hotseat);
mHotseat.resetLayout(false);
- mWorkspace = mRootView.findViewById(R.id.workspace);
- mWorkspace.setPadding(mDp.workspacePadding.left + mDp.cellLayoutPaddingLeftRightPx,
+ if (mDp.isTwoPanels) {
+ CellLayout leftPanel = mRootView.findViewById(R.id.workspace_left);
+ leftPanel.setPadding(mDp.workspacePadding.left + mDp.cellLayoutPaddingLeftRightPx,
+ mDp.workspacePadding.top,
+ mDp.workspacePadding.right + mDp.cellLayoutPaddingLeftRightPx,
+ mDp.workspacePadding.bottom);
+ mWorkspaceScreens.put(LEFT_PANEL_ID, leftPanel);
+ }
+
+ CellLayout firstScreen = mRootView.findViewById(R.id.workspace);
+ firstScreen.setPadding(mDp.workspacePadding.left + mDp.cellLayoutPaddingLeftRightPx,
mDp.workspacePadding.top,
mDp.workspacePadding.right + mDp.cellLayoutPaddingLeftRightPx,
mDp.workspacePadding.bottom);
+ mWorkspaceScreens.put(FIRST_SCREEN_ID, firstScreen);
if (FeatureFlags.WIDGETS_IN_LAUNCHER_PREVIEW.get()) {
mAppWidgetHost = new LauncherPreviewAppWidgetHost(context);
@@ -335,18 +347,20 @@
@Override
public CellLayout getScreenWithId(int screenId) {
- return mWorkspace;
+ return mWorkspaceScreens.get(screenId);
}
private void inflateAndAddIcon(WorkspaceItemInfo info) {
+ CellLayout screen = mWorkspaceScreens.get(info.screenId);
BubbleTextView icon = (BubbleTextView) mHomeElementInflater.inflate(
- R.layout.app_icon, mWorkspace, false);
+ R.layout.app_icon, screen, false);
icon.applyFromWorkspaceItem(info);
addInScreenFromBind(icon, info);
}
private void inflateAndAddFolder(FolderInfo info) {
- FolderIcon folderIcon = FolderIcon.inflateIcon(R.layout.folder_icon, this, mWorkspace,
+ CellLayout screen = mWorkspaceScreens.get(info.screenId);
+ FolderIcon folderIcon = FolderIcon.inflateIcon(R.layout.folder_icon, this, screen,
info);
addInScreenFromBind(folderIcon, info);
}
@@ -396,7 +410,8 @@
}
private void inflateAndAddPredictedIcon(WorkspaceItemInfo info) {
- View view = PredictedAppIconInflater.inflate(mHomeElementInflater, mWorkspace, info);
+ CellLayout screen = mWorkspaceScreens.get(info.screenId);
+ View view = PredictedAppIconInflater.inflate(mHomeElementInflater, screen, info);
if (view != null) {
addInScreenFromBind(view, info);
}
@@ -428,8 +443,7 @@
ArrayList<LauncherAppWidgetInfo> currentAppWidgets = new ArrayList<>();
ArrayList<LauncherAppWidgetInfo> otherAppWidgets = new ArrayList<>();
- IntSet currentScreenIds = IntSet.wrap(0);
- // TODO(b/185508060): support two panel preview.
+ IntSet currentScreenIds = IntSet.wrap(mWorkspaceScreens.keySet());
filterCurrentWorkspaceItems(currentScreenIds, dataModel.workspaceItems,
currentWorkspaceItems, otherWorkspaceItems);
filterCurrentWorkspaceItems(currentScreenIds, dataModel.appWidgets, currentAppWidgets,
@@ -487,12 +501,13 @@
// Add first page QSB
if (FeatureFlags.QSB_ON_FIRST_SCREEN) {
+ CellLayout firstScreen = mWorkspaceScreens.get(FIRST_SCREEN_ID);
View qsb = mHomeElementInflater.inflate(
- R.layout.search_container_workspace, mWorkspace, false);
+ R.layout.search_container_workspace, firstScreen, false);
CellLayout.LayoutParams lp =
- new CellLayout.LayoutParams(0, 0, mWorkspace.getCountX(), 1);
+ new CellLayout.LayoutParams(0, 0, firstScreen.getCountX(), 1);
lp.canReorder = false;
- mWorkspace.addViewToCellLayout(qsb, 0, R.id.search_container_workspace, lp, true);
+ firstScreen.addViewToCellLayout(qsb, 0, R.id.search_container_workspace, lp, true);
}
measureView(mRootView, mDp.widthPx, mDp.heightPx);
diff --git a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
index df49359..13c83be 100644
--- a/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
+++ b/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java
@@ -38,11 +38,13 @@
import androidx.annotation.UiThread;
import androidx.annotation.WorkerThread;
+import com.android.launcher3.DeviceProfile;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
+import com.android.launcher3.Workspace;
import com.android.launcher3.graphics.LauncherPreviewRenderer.PreviewContext;
import com.android.launcher3.model.BgDataModel;
import com.android.launcher3.model.GridSizeMigrationTask;
@@ -163,11 +165,17 @@
@Override
public void run() {
+ DeviceProfile deviceProfile = mIdp.getDeviceProfile(mContext);
+ String query = (deviceProfile.isTwoPanels ? LauncherSettings.Favorites.SCREEN
+ + " = " + Workspace.LEFT_PANEL_ID + " or " : "")
+ + LauncherSettings.Favorites.SCREEN + " = " + Workspace.FIRST_SCREEN_ID
+ + " or " + LauncherSettings.Favorites.CONTAINER + " = "
+ + LauncherSettings.Favorites.CONTAINER_HOTSEAT;
loadWorkspace(new ArrayList<>(), LauncherSettings.Favorites.PREVIEW_CONTENT_URI,
- LauncherSettings.Favorites.SCREEN + " = 0 or "
- + LauncherSettings.Favorites.CONTAINER + " = "
- + LauncherSettings.Favorites.CONTAINER_HOTSEAT);
+ query);
+
MAIN_EXECUTOR.execute(() -> {
+ mBgDataModel.isLeftPanelShown = deviceProfile.isTwoPanels;
renderView(previewContext, mBgDataModel, mWidgetProvidersMap);
mOnDestroyCallbacks.add(previewContext::onDestroy);
});
diff --git a/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java b/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java
index 8a1d73e..3935bcf 100644
--- a/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java
+++ b/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java
@@ -41,6 +41,7 @@
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.Utilities;
+import com.android.launcher3.Workspace;
import com.android.launcher3.graphics.LauncherPreviewRenderer;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.pm.InstallSessionHelper;
@@ -183,7 +184,7 @@
Point targetSize = new Point(idp.numColumns, idp.numRows);
GridSizeMigrationTaskV2 task = new GridSizeMigrationTaskV2(context, t.getDb(),
srcReader, destReader, idp.numDatabaseHotseatIcons, targetSize);
- task.migrate();
+ task.migrate(idp);
if (!migrateForPreview) {
dropTable(t.getDb(), LauncherSettings.Favorites.TMP_TABLE);
@@ -210,7 +211,7 @@
}
@VisibleForTesting
- protected boolean migrate() {
+ protected boolean migrate(InvariantDeviceProfile idp) {
if (mHotseatDiff.isEmpty() && mWorkspaceDiff.isEmpty()) {
return false;
}
@@ -224,7 +225,17 @@
Collections.sort(mWorkspaceDiff);
// Migrate workspace.
+ // First we create a collection of the screens
+ List<Integer> screens = new ArrayList<>();
+ if (idp.getDeviceProfile(mContext).isTwoPanels) {
+ screens.add(Workspace.LEFT_PANEL_ID);
+ }
for (int screenId = 0; screenId <= mDestReader.mLastScreenId; screenId++) {
+ screens.add(screenId);
+ }
+
+ // Then we place the items on the screens
+ for (int screenId : screens) {
if (DEBUG) {
Log.d(TAG, "Migrating " + screenId);
}
@@ -236,6 +247,8 @@
}
}
+ // In case the new grid is smaller, there might be some leftover items that don't fit on
+ // any of the screens, in this case we add them to new screens until all of them are placed.
int screenId = mDestReader.mLastScreenId + 1;
while (!mWorkspaceDiff.isEmpty()) {
GridPlacementSolution workspaceSolution = new GridPlacementSolution(mDb, mSrcReader,
diff --git a/src/com/android/launcher3/settings/DeveloperOptionsFragment.java b/src/com/android/launcher3/settings/DeveloperOptionsFragment.java
index 8fe42ac..4d63218 100644
--- a/src/com/android/launcher3/settings/DeveloperOptionsFragment.java
+++ b/src/com/android/launcher3/settings/DeveloperOptionsFragment.java
@@ -293,8 +293,7 @@
"tutorial_steps",
new String[] {
"HOME_NAVIGATION",
- "LEFT_EDGE_BACK_NAVIGATION",
- "RIGHT_EDGE_BACK_NAVIGATION",
+ "BACK_NAVIGATION",
"OVERVIEW_NAVIGATION"}));
return true;
});
@@ -306,7 +305,7 @@
launchBackTutorialPreference.setOnPreferenceClickListener(preference -> {
startActivity(launchSandboxIntent.putExtra(
"tutorial_steps",
- new String[] {"LEFT_EDGE_BACK_NAVIGATION", "RIGHT_EDGE_BACK_NAVIGATION"}));
+ new String[] {"BACK_NAVIGATION"}));
return true;
});
sandboxCategory.addPreference(launchBackTutorialPreference);
diff --git a/src/com/android/launcher3/util/IntSet.java b/src/com/android/launcher3/util/IntSet.java
index 0f4df62..e5b4f59 100644
--- a/src/com/android/launcher3/util/IntSet.java
+++ b/src/com/android/launcher3/util/IntSet.java
@@ -101,6 +101,15 @@
return wrap(IntArray.wrap(array));
}
+ /**
+ * Returns an IntSet with the given values.
+ */
+ public static IntSet wrap(Iterable<Integer> iterable) {
+ IntSet set = new IntSet();
+ iterable.forEach(set::add);
+ return set;
+ }
+
@Override
public Iterator<Integer> iterator() {
return mArray.iterator();
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java
index 6605509..edcab4e 100644
--- a/src/com/android/launcher3/widget/WidgetCell.java
+++ b/src/com/android/launcher3/widget/WidgetCell.java
@@ -16,12 +16,14 @@
package com.android.launcher3.widget;
+import static android.view.View.MeasureSpec.makeMeasureSpec;
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_WIDGETS_TRAY;
import static com.android.launcher3.Utilities.ATLEAST_S;
import android.content.Context;
import android.graphics.Bitmap;
-import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.CancellationSignal;
import android.util.AttributeSet;
@@ -31,6 +33,7 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnLayoutChangeListener;
+import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.FrameLayout;
@@ -71,11 +74,36 @@
/** Widget preview width is calculated by multiplying this factor to the widget cell width. */
private static final float PREVIEW_SCALE = 0.8f;
- protected int mPreviewWidth;
- protected int mPreviewHeight;
+ /**
+ * The maximum dimension that can be used as the size in
+ * {@link android.view.View.MeasureSpec#makeMeasureSpec(int, int)}.
+ *
+ * <p>This is equal to (1 << MeasureSpec.MODE_SHIFT) - 1.
+ */
+ private static final int MAX_MEASURE_SPEC_DIMENSION = (1 << 30) - 1;
+
+ /**
+ * The target preview width, in pixels, of a widget or a shortcut.
+ *
+ * <p>The actual preview width may be smaller than or equal to this value subjected to scaling.
+ */
+ protected int mTargetPreviewWidth;
+
+ /**
+ * The target preview height, in pixels, of a widget or a shortcut.
+ *
+ * <p>The actual preview height may be smaller than or equal to this value subjected to scaling.
+ */
+ protected int mTargetPreviewHeight;
+
protected int mPresetPreviewSize;
+
private int mCellSize;
- private float mPreviewScale = 1f;
+
+ /**
+ * The scale of the preview container.
+ */
+ private float mPreviewContainerScale = 1f;
private FrameLayout mWidgetImageContainer;
private WidgetImageView mWidgetImage;
@@ -96,7 +124,6 @@
protected final BaseActivity mActivity;
private final CheckLongPressHelper mLongPressHelper;
private final float mEnforcedCornerRadius;
- private final int mShortcutPreviewPadding;
private RemoteViews mRemoteViewsPreview;
private NavigableAppWidgetHostView mAppWidgetHostViewPreview;
@@ -122,14 +149,12 @@
setClipToPadding(false);
setAccessibilityDelegate(mActivity.getAccessibilityDelegate());
mEnforcedCornerRadius = RoundedCornerEnforcement.computeEnforcedRadius(context);
- mShortcutPreviewPadding =
- 2 * getResources().getDimensionPixelSize(R.dimen.widget_preview_shortcut_padding);
}
private void setContainerWidth() {
mCellSize = (int) (mActivity.getDeviceProfile().allAppsIconSizePx * WIDTH_SCALE);
mPresetPreviewSize = (int) (mCellSize * PREVIEW_SCALE);
- mPreviewWidth = mPreviewHeight = mPresetPreviewSize;
+ mTargetPreviewWidth = mTargetPreviewHeight = mPresetPreviewSize;
}
@Override
@@ -166,7 +191,7 @@
mWidgetDims.setText(null);
mWidgetDescription.setText(null);
mWidgetDescription.setVisibility(GONE);
- mPreviewWidth = mPreviewHeight = mPresetPreviewSize;
+ mTargetPreviewWidth = mTargetPreviewHeight = mPresetPreviewSize;
if (mActiveRequest != null) {
mActiveRequest.cancel();
@@ -209,8 +234,6 @@
mWidgetPreviewLoader = loader;
if (item.activityInfo != null) {
setTag(new PendingAddShortcutInfo(item.activityInfo));
- mPreviewWidth += mShortcutPreviewPadding;
- mPreviewHeight += mShortcutPreviewPadding;
} else {
setTag(new PendingAddWidgetInfo(item.widgetInfo, mSourceContainer));
}
@@ -250,16 +273,6 @@
@Nullable RemoteViews remoteViews) {
appWidgetHostViewPreview.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
appWidgetHostViewPreview.setAppWidget(/* appWidgetId= */ -1, providerInfo);
- Rect padding;
- DeviceProfile deviceProfile = mActivity.getDeviceProfile();
- if (deviceProfile.shouldInsetWidgets()) {
- padding = new Rect();
- appWidgetHostViewPreview.getWidgetInset(deviceProfile, padding);
- } else {
- padding = deviceProfile.inv.defaultWidgetPadding;
- }
- appWidgetHostViewPreview.setPadding(padding.left, padding.top, padding.right,
- padding.bottom);
appWidgetHostViewPreview.updateAppWidget(remoteViews);
}
@@ -307,7 +320,7 @@
if (getWidth() > 0 && getHeight() > 0) {
// Scale down the preview size if it's wider than the cell.
float maxWidth = getWidth();
- float previewWidth = drawable.getIntrinsicWidth() * mPreviewScale;
+ float previewWidth = drawable.getIntrinsicWidth() * mPreviewContainerScale;
scale = Math.min(maxWidth / previewWidth, 1);
}
setContainerSize(
@@ -331,16 +344,32 @@
private void setContainerSize(int width, int height) {
LayoutParams layoutParams = (LayoutParams) mWidgetImageContainer.getLayoutParams();
- layoutParams.width = (int) (width * mPreviewScale);
- layoutParams.height = (int) (height * mPreviewScale);
+ layoutParams.width = width;
+ layoutParams.height = height;
mWidgetImageContainer.setLayoutParams(layoutParams);
}
public void ensurePreview() {
if (mAppWidgetHostViewPreview != null) {
- setContainerSize(mPreviewWidth, mPreviewHeight);
+ int containerWidth = (int) (mTargetPreviewWidth * mPreviewContainerScale);
+ int containerHeight = (int) (mTargetPreviewHeight * mPreviewContainerScale);
+ setContainerSize(containerWidth, containerHeight);
+ if (mAppWidgetHostViewPreview.getChildCount() == 1) {
+ View widgetContent = mAppWidgetHostViewPreview.getChildAt(0);
+ ViewGroup.LayoutParams layoutParams = widgetContent.getLayoutParams();
+ // We only scale preview if both the width & height of the outermost view group are
+ // not set to MATCH_PARENT.
+ boolean shouldScale =
+ layoutParams.width != MATCH_PARENT && layoutParams.height != MATCH_PARENT;
+ if (shouldScale) {
+ setNoClip(mWidgetImageContainer);
+ setNoClip(mAppWidgetHostViewPreview);
+ float previewLayoutScale = computeWidgetPreviewScale();
+ mAppWidgetHostViewPreview.setScaleToFit(previewLayoutScale);
+ }
+ }
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
- mPreviewWidth, mPreviewHeight, Gravity.FILL);
+ containerWidth, containerHeight, Gravity.FILL);
mAppWidgetHostViewPreview.setLayoutParams(params);
mWidgetImageContainer.addView(mAppWidgetHostViewPreview, /* index= */ 0);
mWidgetImage.setVisibility(View.GONE);
@@ -352,24 +381,22 @@
}
mActiveRequest = mWidgetPreviewLoader.loadPreview(
BaseActivity.fromContext(getContext()), mItem,
- new Size(mPreviewWidth, mPreviewHeight),
+ new Size(mTargetPreviewWidth, mTargetPreviewHeight),
this::applyPreview);
}
/** Sets the widget preview image size in number of cells. */
- public Size setPreviewSize(int spanX, int spanY) {
- return setPreviewSize(spanX, spanY, 1f);
+ public Size setPreviewSize(WidgetItem widgetItem) {
+ return setPreviewSize(widgetItem, 1f);
}
/** Sets the widget preview image size, in number of cells, and preview scale. */
- public Size setPreviewSize(int spanX, int spanY, float previewScale) {
+ public Size setPreviewSize(WidgetItem widgetItem, float previewScale) {
DeviceProfile deviceProfile = mActivity.getDeviceProfile();
- Size widgetSize =
- mItem != null ? WidgetSizes.getWidgetItemSizePx(getContext(), deviceProfile, mItem)
- : WidgetSizes.getWidgetSizePx(deviceProfile, spanX, spanY);
- mPreviewWidth = widgetSize.getWidth();
- mPreviewHeight = widgetSize.getHeight();
- mPreviewScale = previewScale;
+ Size widgetSize = WidgetSizes.getWidgetItemSizePx(getContext(), deviceProfile, widgetItem);
+ mTargetPreviewWidth = widgetSize.getWidth();
+ mTargetPreviewHeight = widgetSize.getHeight();
+ mPreviewContainerScale = previewScale;
return widgetSize;
}
@@ -414,4 +441,35 @@
super.onInitializeAccessibilityNodeInfo(info);
info.removeAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_CLICK);
}
+
+ private static void setNoClip(ViewGroup view) {
+ view.setClipChildren(false);
+ view.setClipToPadding(false);
+ }
+
+ private float computeWidgetPreviewScale() {
+ if (mAppWidgetHostViewPreview.getChildCount() != 1) {
+ return 1f;
+ }
+
+ // Measure the largest possible width & height that the app widget wants to display.
+ mAppWidgetHostViewPreview.measure(
+ makeMeasureSpec(MAX_MEASURE_SPEC_DIMENSION, MeasureSpec.UNSPECIFIED),
+ makeMeasureSpec(MAX_MEASURE_SPEC_DIMENSION, MeasureSpec.UNSPECIFIED));
+ int appWidgetContentWidth = mAppWidgetHostViewPreview.getChildAt(0).getMeasuredWidth();
+ int appWidgetContentHeight = mAppWidgetHostViewPreview.getChildAt(0).getMeasuredHeight();
+ if (appWidgetContentWidth == 0 || appWidgetContentHeight == 0) {
+ return 1f;
+ }
+
+ int horizontalPadding = mAppWidgetHostViewPreview.getPaddingStart()
+ + mAppWidgetHostViewPreview.getPaddingEnd();
+ int verticalPadding = mAppWidgetHostViewPreview.getPaddingTop()
+ + mAppWidgetHostViewPreview.getPaddingBottom();
+ return Math.min(
+ (mTargetPreviewWidth - horizontalPadding) * mPreviewContainerScale
+ / appWidgetContentWidth,
+ (mTargetPreviewHeight - verticalPadding) * mPreviewContainerScale
+ / appWidgetContentHeight);
+ }
}
diff --git a/src/com/android/launcher3/widget/WidgetsBottomSheet.java b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
index 14aeaf6..406de10 100644
--- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java
+++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
@@ -202,7 +202,7 @@
tableRow.setGravity(Gravity.TOP);
row.forEach(widgetItem -> {
WidgetCell widget = addItemCell(tableRow);
- widget.setPreviewSize(widgetItem.spanX, widgetItem.spanY);
+ widget.setPreviewSize(widgetItem);
widget.applyFromCellItem(widgetItem, LauncherAppState.getInstance(mActivityContext)
.getWidgetCache());
widget.ensurePreview();
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
index 57dec14..9c06558 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
@@ -120,7 +120,7 @@
WidgetCell widget = (WidgetCell) row.getChildAt(j);
widget.clear();
WidgetItem widgetItem = widgetItemsPerRow.get(j);
- Size previewSize = widget.setPreviewSize(widgetItem.spanX, widgetItem.spanY);
+ Size previewSize = widget.setPreviewSize(widgetItem);
widget.applyFromCellItem(widgetItem, mWidgetPreviewLoader);
widget.setApplyBitmapDeferred(mApplyBitmapDeferred);
Bitmap preview = mWidgetPreviewLoader.getPreview(widgetItem, previewSize);
diff --git a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
index 3800ede..0b8ca34 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
@@ -115,7 +115,7 @@
for (WidgetItem widgetItem : widgetItems) {
WidgetCell widgetCell = addItemCell(tableRow);
- widgetCell.setPreviewSize(widgetItem.spanX, widgetItem.spanY, data.mPreviewScale);
+ widgetCell.setPreviewSize(widgetItem, data.mPreviewScale);
widgetCell.applyFromCellItem(widgetItem,
LauncherAppState.getInstance(getContext()).getWidgetCache());
widgetCell.ensurePreview();
diff --git a/src/com/android/launcher3/widget/util/WidgetSizes.java b/src/com/android/launcher3/widget/util/WidgetSizes.java
index e2c84b5..451ed6e 100644
--- a/src/com/android/launcher3/widget/util/WidgetSizes.java
+++ b/src/com/android/launcher3/widget/util/WidgetSizes.java
@@ -32,6 +32,7 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherAppState;
+import com.android.launcher3.R;
import com.android.launcher3.model.WidgetItem;
import java.util.ArrayList;
@@ -91,7 +92,9 @@
public static Size getWidgetItemSizePx(Context context, DeviceProfile profile,
WidgetItem widgetItem) {
if (widgetItem.isShortcut()) {
- return getWidgetSizePx(profile, widgetItem.spanX, widgetItem.spanY);
+ int dimension = profile.allAppsIconSizePx + 2 * context.getResources()
+ .getDimensionPixelSize(R.dimen.widget_preview_shortcut_padding);
+ return new Size(dimension, dimension);
}
return getWidgetPaddedSizePx(context, widgetItem.componentName, profile, widgetItem.spanX,
widgetItem.spanY);
diff --git a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
index 0c9c463..4978c01 100644
--- a/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/AddConfigWidgetTest.java
@@ -102,8 +102,7 @@
setResult(acceptConfig);
if (acceptConfig) {
- // Dismiss widget resize frame.
- mDevice.pressHome();
+ // TODO(b/192655785) Assert widget resize frame is shown and then dismiss it.
Wait.atMost("", new WidgetSearchCondition(), DEFAULT_ACTIVITY_TIMEOUT, mLauncher);
assertNotNull(mAppWidgetManager.getAppWidgetInfo(mWidgetId));
} else {
diff --git a/tests/tapl/com/android/launcher3/tapl/AllApps.java b/tests/tapl/com/android/launcher3/tapl/AllApps.java
index 1cb6b2d..78301e4 100644
--- a/tests/tapl/com/android/launcher3/tapl/AllApps.java
+++ b/tests/tapl/com/android/launcher3/tapl/AllApps.java
@@ -135,6 +135,7 @@
.collect(Collectors.toList()),
mLauncher.getVisibleBounds(searchBox).bottom
- mLauncher.getVisibleBounds(allAppsContainer).top);
+ verifyActiveContainer();
final int newScroll = getAllAppsScroll();
mLauncher.assertTrue(
"Scrolled in a wrong direction in AllApps: from " + scroll + " to "
@@ -144,7 +145,6 @@
mLauncher.assertTrue(
"Exceeded max scroll attempts: " + MAX_SCROLL_ATTEMPTS,
++attempts <= MAX_SCROLL_ATTEMPTS);
- verifyActiveContainer();
scroll = newScroll;
}
}
diff --git a/tests/tapl/com/android/launcher3/tapl/Background.java b/tests/tapl/com/android/launcher3/tapl/Background.java
index 75b87b7..b290bb1 100644
--- a/tests/tapl/com/android/launcher3/tapl/Background.java
+++ b/tests/tapl/com/android/launcher3/tapl/Background.java
@@ -71,6 +71,10 @@
return mLauncher.isTablet();
}
+ protected boolean zeroButtonToOverviewGestureStateTransitionWhileHolding() {
+ return false;
+ }
+
protected void goToOverviewUnchecked() {
switch (mLauncher.getNavigationModel()) {
case ZERO_BUTTON: {
@@ -90,21 +94,32 @@
mLauncher.sendPointer(
downTime, downTime, MotionEvent.ACTION_DOWN, start, gestureScope);
- mLauncher.executeAndWaitForLauncherEvent(
- () -> mLauncher.movePointer(
- downTime,
- downTime,
- ZERO_BUTTON_SWIPE_UP_GESTURE_DURATION,
- start,
- end,
- gestureScope),
- event -> TestProtocol.PAUSE_DETECTED_MESSAGE.equals(event.getClassName()),
- () -> "Pause wasn't detected", "swiping and holding");
- mLauncher.runToState(
- () -> mLauncher.sendPointer(
- downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, end,
- gestureScope),
- OVERVIEW_STATE_ORDINAL, "sending UP event");
+ Runnable swipeAndHold = () -> mLauncher.movePointer(
+ downTime,
+ downTime,
+ ZERO_BUTTON_SWIPE_UP_GESTURE_DURATION,
+ start,
+ end,
+ gestureScope);
+ String swipeAndHoldAction = "swiping and holding";
+ Runnable up = () -> mLauncher.sendPointer(
+ downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, end,
+ gestureScope);
+ String upAction = "sending UP event";
+ if (zeroButtonToOverviewGestureStateTransitionWhileHolding()) {
+ mLauncher.runToState(swipeAndHold, OVERVIEW_STATE_ORDINAL, swipeAndHoldAction);
+ try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(upAction)) {
+ up.run();
+ }
+ } else {
+ mLauncher.executeAndWaitForLauncherEvent(
+ swipeAndHold,
+ event -> TestProtocol.PAUSE_DETECTED_MESSAGE.equals(
+ event.getClassName()),
+ () -> "Pause wasn't detected",
+ swipeAndHoldAction);
+ mLauncher.runToState(up, OVERVIEW_STATE_ORDINAL, upAction);
+ }
break;
}
diff --git a/tests/tapl/com/android/launcher3/tapl/Home.java b/tests/tapl/com/android/launcher3/tapl/Home.java
index 0060844..ee9dd1a 100644
--- a/tests/tapl/com/android/launcher3/tapl/Home.java
+++ b/tests/tapl/com/android/launcher3/tapl/Home.java
@@ -63,4 +63,8 @@
return true;
}
+ @Override
+ protected boolean zeroButtonToOverviewGestureStateTransitionWhileHolding() {
+ return true;
+ }
}
\ No newline at end of file
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 9d6cb4e..c4d46ee 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -505,7 +505,7 @@
checkForAnomaly();
Assert.fail(formatSystemHealthMessage(formatErrorWithEvents(
"http://go/tapl test failure:\nContext: " + getContextDescription()
- + " - visible state is " + getVisibleStateMessage()
+ + " => resulting visible state is " + getVisibleStateMessage()
+ ";\nDetails: " + message, true)));
}
@@ -699,7 +699,8 @@
* @return the Workspace object.
*/
public Workspace pressHome() {
- try (LauncherInstrumentation.Closable e = eventsCheck()) {
+ try (LauncherInstrumentation.Closable e = eventsCheck();
+ LauncherInstrumentation.Closable c = addContextLayer("want to switch to home")) {
waitForLauncherInitialized();
// Click home, then wait for any accessibility event, then wait until accessibility
// events stop.
@@ -719,7 +720,7 @@
displaySize.x / 2, 0,
ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME,
false, GestureScope.INSIDE_TO_OUTSIDE);
- try (LauncherInstrumentation.Closable c = addContextLayer(
+ try (LauncherInstrumentation.Closable c1 = addContextLayer(
"Swiped up from context menu to home")) {
waitUntilLauncherObjectGone(CONTEXT_MENU_RES_ID);
// Swiping up can temporarily bring Nexus Launcher if the current
@@ -735,6 +736,7 @@
dumpViewHierarchy();
action = "swiping up to home";
+ final boolean launcherIsVisible = isLauncherVisible();
swipeToState(
displaySize.x / 2, displaySize.y - 1,
displaySize.x / 2, 0,
@@ -742,6 +744,9 @@
launcherWasVisible
? GestureScope.INSIDE_TO_OUTSIDE
: GestureScope.OUTSIDE_WITH_PILFER);
+ // b/193653850: launcherWasVisible is a flaky indicator.
+ log("launcherWasVisible: " + launcherWasVisible + ", launcherIsVisible: "
+ + launcherIsVisible);
}
} else {
log("Hierarchy before clicking home:");
@@ -764,7 +769,7 @@
|| hasLauncherObject(OVERVIEW_RES_ID)),
action);
}
- try (LauncherInstrumentation.Closable c = addContextLayer(
+ try (LauncherInstrumentation.Closable c1 = addContextLayer(
"performed action to switch to Home - " + action)) {
return getWorkspace();
}