summaryrefslogtreecommitdiffstats
path: root/policy/src/com/android
diff options
context:
space:
mode:
authorMindy Pereira <mindyp@google.com>2014-04-17 14:01:04 -0700
committerMindy Pereira <mindyp@google.com>2014-04-17 14:53:24 -0700
commitb0ea484615574b6fcf0103ff6ff79cc73e449bc4 (patch)
tree20dd1c9eb25668d12cfd6bbbdf599eac3b872980 /policy/src/com/android
parentb279f5272e2c7554aeab930ba0aabab12efff9e2 (diff)
downloadframeworks_base-b0ea484615574b6fcf0103ff6ff79cc73e449bc4.zip
frameworks_base-b0ea484615574b6fcf0103ff6ff79cc73e449bc4.tar.gz
frameworks_base-b0ea484615574b6fcf0103ff6ff79cc73e449bc4.tar.bz2
Update window alpha at the same time as translating
Note: algorithm for alpha per progress may be updated This is a first pass proof of concept Change-Id: Ia043200ea737ff9d132e350449e17ba0fde10d65
Diffstat (limited to 'policy/src/com/android')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index bed3462..56abfb4 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -3449,6 +3449,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
SwipeDismissLayout layout, float progress, float translate) {
WindowManager.LayoutParams newParams = getAttributes();
newParams.x = (int) translate;
+ newParams.alpha = 1 - progress;
setAttributes(newParams);
int flags = 0;
@@ -3464,6 +3465,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
public void onSwipeCancelled(SwipeDismissLayout layout) {
WindowManager.LayoutParams newParams = getAttributes();
newParams.x = 0;
+ newParams.alpha = 1;
setAttributes(newParams);
setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
}