summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff DeCew <jeffdq@google.com> 2021-04-08 17:53:09 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-04-08 17:53:09 +0000
commitc08065383de926a6db2bbb3c8a4ba8fbe33b9f15 (patch)
treec2bb966d42144940411bb97d94778ed05d4278b1
parent164fadf842f996c7b1c705a37d9fc3aa79825a51 (diff)
parente6df133d98085a6d795d453f9eff53a9f46a3c3f (diff)
Merge "Remove a bit of animation clutter from group update cascades." into sc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/Interpolators.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java8
2 files changed, 9 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/Interpolators.java b/packages/SystemUI/src/com/android/systemui/Interpolators.java
index 2eba9521b9e7..c23bcb8dcbb0 100644
--- a/packages/SystemUI/src/com/android/systemui/Interpolators.java
+++ b/packages/SystemUI/src/com/android/systemui/Interpolators.java
@@ -40,6 +40,7 @@ public class Interpolators {
new PathInterpolator(0.8f, 0f, 0.6f, 1f);
public static final Interpolator FAST_OUT_LINEAR_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
public static final Interpolator LINEAR_OUT_SLOW_IN = new PathInterpolator(0f, 0f, 0.2f, 1f);
+ public static final Interpolator SLOW_OUT_LINEAR_IN = new PathInterpolator(0.8f, 0f, 1f, 1f);
public static final Interpolator ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
public static final Interpolator ALPHA_OUT = new PathInterpolator(0f, 0f, 0.8f, 1f);
public static final Interpolator LINEAR = new LinearInterpolator();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
index 18e5ead7fbb8..17f70cb08218 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
@@ -720,6 +720,10 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
mCurrentAppearInterpolator = mSlowOutFastInInterpolator;
mCurrentAlphaInterpolator = Interpolators.LINEAR_OUT_SLOW_IN;
targetValue = 1.0f;
+ if (!mIsHeadsUpAnimation && isChildInGroup()) {
+ // slower fade in of children to avoid visibly overlapping with other children
+ mCurrentAlphaInterpolator = Interpolators.SLOW_OUT_LINEAR_IN;
+ }
} else {
mCurrentAppearInterpolator = Interpolators.FAST_OUT_SLOW_IN;
mCurrentAlphaInterpolator = mSlowOutLinearInInterpolator;
@@ -819,6 +823,10 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
if (mIsHeadsUpAnimation && !mIsAppearing) {
startWidthFraction = 0;
}
+ if (mIsAppearing && !mIsHeadsUpAnimation && isChildInGroup()) {
+ // Children in a group (when not heads up) should simply fade in.
+ startWidthFraction = 1;
+ }
float width = MathUtils.lerp(startWidthFraction, 1.0f, 1.0f - widthFraction)
* getWidth();
float left;