summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java
index c0daf72..9c1ff9d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java
@@ -51,16 +51,27 @@ public class QSDetailClipper {
if (listener != null) {
mAnimator.addListener(listener);
}
+ mDetail.setLayerType(View.LAYER_TYPE_HARDWARE, null);
if (in) {
mBackground.startTransition((int)(mAnimator.getDuration() * 0.6));
mAnimator.addListener(mVisibleOnStart);
mAnimator.start();
} else {
+ mDetail.postDelayed(mReverseBackground, (long)(mAnimator.getDuration() * 0.65));
mAnimator.addListener(mGoneOnEnd);
mAnimator.reverse();
}
}
+ private final Runnable mReverseBackground = new Runnable() {
+ @Override
+ public void run() {
+ if (mAnimator != null) {
+ mBackground.reverseTransition((int)(mAnimator.getDuration() * 0.35));
+ }
+ }
+ };
+
private final AnimatorListenerAdapter mVisibleOnStart = new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
@@ -68,6 +79,7 @@ public class QSDetailClipper {
}
public void onAnimationEnd(Animator animation) {
+ mDetail.setLayerType(View.LAYER_TYPE_NONE, null);
mAnimator = null;
}
};
@@ -75,6 +87,7 @@ public class QSDetailClipper {
private final AnimatorListenerAdapter mGoneOnEnd = new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
+ mDetail.setLayerType(View.LAYER_TYPE_NONE, null);
mDetail.setVisibility(View.GONE);
mBackground.resetTransition();
mAnimator = null;