Improve motion when expanding/collapsing status bar.
- Don't fade the whole panel anymore.
- Parallax effect for QS header translation, fade on keyguard.
- Improve fling curve for dismissing the panel.
- Improve peeking behavior.
Bug: 14804452
Bug: 15407838
Change-Id: I34b7bcd457cb8a037e0bb06e9802ec66d2b39b73
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 12aa004..1e45ce3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -93,15 +93,14 @@
}
private void runPeekAnimation() {
+ mPeekHeight = getPeekHeight();
if (DEBUG) logf("peek to height=%.1f", mPeekHeight);
if (mHeightAnimator != null) {
return;
}
- if (mPeekAnimator == null) {
- mPeekAnimator = ObjectAnimator.ofFloat(this,
- "expandedHeight", mPeekHeight)
- .setDuration(250);
- }
+ mPeekAnimator = ObjectAnimator.ofFloat(this,
+ "expandedHeight", mPeekHeight)
+ .setDuration(250);
mPeekAnimator.start();
}
@@ -115,9 +114,6 @@
protected void loadDimens() {
final Resources res = getContext().getResources();
- mPeekHeight = res.getDimension(R.dimen.peek_height)
- + getPaddingBottom(); // our window might have a dropshadow
-
final ViewConfiguration configuration = ViewConfiguration.get(getContext());
mTouchSlop = configuration.getScaledTouchSlop();
mHintDistance = res.getDimension(R.dimen.hint_move_distance);
@@ -758,4 +754,6 @@
}
public abstract void resetViews();
+
+ protected abstract float getPeekHeight();
}