summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@google.com> 2011-01-30 01:24:09 -0500
committer Daniel Sandler <dsandler@google.com> 2011-01-30 01:24:09 -0500
commit8c9891840aa26e788750e8b2f12bbbb0bae0f9f3 (patch)
tree65ec5a0d6323ee1df991381456fbcec03f88dade
parenta2e765ef1ad2cb907a4ae0a93bb15e4764ebb59a (diff)
Fix broken intitial notification panel animation.
I also tuned the animation parameters a bit to get things to look just a tiny bit smoother. The first run is still jerky but it's not jumping all over the place in the wrong direction. Bug: 3404950 Change-Id: Id10c52f227e6d2db428dc860097023560d154356
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index 372aa90410eb..22fed63a0394 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -320,7 +320,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
if (mNotificationCount == 0) {
end += mContentFrameMissingTranslation;
}
- start = (y < (HYPERSPACE_OFFRAMP+end)) ? y : (HYPERSPACE_OFFRAMP+end);
+ start = HYPERSPACE_OFFRAMP+end;
} else {
start = y;
end = y + HYPERSPACE_OFFRAMP;
@@ -336,10 +336,15 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
mContentAnim.cancel();
}
+ Animator fadeAnim = ObjectAnimator.ofFloat(mContentParent, "alpha",
+ mContentParent.getAlpha(), appearing ? 1.0f : 0.0f);
+ fadeAnim.setInterpolator(appearing
+ ? new android.view.animation.AccelerateInterpolator(2.0f)
+ : new android.view.animation.DecelerateInterpolator(2.0f));
+
mContentAnim = new AnimatorSet();
mContentAnim
- .play(ObjectAnimator.ofFloat(mContentParent, "alpha",
- mContentParent.getAlpha(), appearing ? 1.0f : 0.0f))
+ .play(fadeAnim)
.with(bgAnim)
.with(posAnim)
;