diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/res/values/colors.xml | 2 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index a3bfe5a..a63deb0 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -44,7 +44,7 @@ <color name="qs_tile_text">#B3FFFFFF</color><!-- 70% white --> <color name="qs_subhead">#99FFFFFF</color><!-- 60% white --> <color name="qs_detail_empty">#24B0BEC5</color><!-- 14% blue grey 200--> - <color name="qs_detail_transition">#99FFFFFF</color> + <color name="qs_detail_transition">#66FFFFFF</color> <color name="data_usage_secondary">#99FFFFFF</color><!-- 60% white --> <color name="data_usage_graph_track">#33FFFFFF</color><!-- 20% white --> <color name="data_usage_graph_warning">#FFFFFFFF</color> 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; |