diff options
author | Mark Renouf <mrenouf@google.com> | 2014-05-01 17:36:04 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-01 17:36:04 +0000 |
commit | 61bc9f37cc0e0921d2e205dccdd45df36c353a9c (patch) | |
tree | ebabdb015bce57c35afe3c13da08e2998dec96cd /policy | |
parent | 6e6a6e863df6cc5e7b930b1197b1f6743ba31d8e (diff) | |
parent | 5b72a6abf85b26e66589db478cc105e7bfec6116 (diff) | |
download | frameworks_base-61bc9f37cc0e0921d2e205dccdd45df36c353a9c.zip frameworks_base-61bc9f37cc0e0921d2e205dccdd45df36c353a9c.tar.gz frameworks_base-61bc9f37cc0e0921d2e205dccdd45df36c353a9c.tar.bz2 |
am 5b72a6ab: am 41615284: Merge "SwipeDismiss: limit fade to 50% alpha while swiping" into klp-modular-dev
* commit '5b72a6abf85b26e66589db478cc105e7bfec6116':
SwipeDismiss: limit fade to 50% alpha while swiping
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 0550dd4..50e2a2e 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -3573,14 +3573,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { }); swipeDismiss.setOnSwipeProgressChangedListener( new SwipeDismissLayout.OnSwipeProgressChangedListener() { + private static final float ALPHA_DECREASE = 0.5f; private boolean mIsTranslucent = false; - @Override public void onSwipeProgressChanged( SwipeDismissLayout layout, float progress, float translate) { WindowManager.LayoutParams newParams = getAttributes(); newParams.x = (int) translate; - newParams.alpha = 1 - progress; + newParams.alpha = 1 - (progress * ALPHA_DECREASE); setAttributes(newParams); int flags = 0; |