summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorMark Renouf <mrenouf@google.com>2014-05-01 17:32:10 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-01 17:32:10 +0000
commit5b72a6abf85b26e66589db478cc105e7bfec6116 (patch)
tree8ffccf590759b4699116648c00b488cf09ca70e7 /policy
parent1ffec559d04618fbd31eaf972a81c6df324965c1 (diff)
parent41615284dfb00595ed642c4e31da6a035ff53224 (diff)
downloadframeworks_base-5b72a6abf85b26e66589db478cc105e7bfec6116.zip
frameworks_base-5b72a6abf85b26e66589db478cc105e7bfec6116.tar.gz
frameworks_base-5b72a6abf85b26e66589db478cc105e7bfec6116.tar.bz2
am 41615284: Merge "SwipeDismiss: limit fade to 50% alpha while swiping" into klp-modular-dev
* commit '41615284dfb00595ed642c4e31da6a035ff53224': SwipeDismiss: limit fade to 50% alpha while swiping
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java4
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;