diff options
author | Mark Renouf <mrenouf@google.com> | 2014-04-30 20:50:30 -0400 |
---|---|---|
committer | Mark Renouf <mrenouf@google.com> | 2014-05-01 01:21:19 +0000 |
commit | d07612163030ea014b04f8271d47745393f4a06e (patch) | |
tree | 568ae9040531419a803eca5c5a911ce3ca56c9d2 /policy | |
parent | 92bc07534e511b9afa7edaffe867d2674c504d73 (diff) | |
download | frameworks_base-d07612163030ea014b04f8271d47745393f4a06e.zip frameworks_base-d07612163030ea014b04f8271d47745393f4a06e.tar.gz frameworks_base-d07612163030ea014b04f8271d47745393f4a06e.tar.bz2 |
SwipeDismiss: limit fade to 50% alpha while swiping
BUG: 14319825
Change-Id: I3704fab77f2d3660ae374bdf16c767c124dcb8e9
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 56abfb4..fb4466d 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -3442,14 +3442,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; |