summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-07-19 16:36:43 -0700
committerAdam Cohen <adamcohen@google.com>2013-07-19 16:36:50 -0700
commit955806dfc49aa793a386722800be9433f94c5563 (patch)
tree561a555f07170939a268984c851b1c09660fc1b1 /src
parent22cba7f9958569a5e4c1dfcce4969daeaa6c898c (diff)
downloadandroid_packages_apps_Trebuchet-955806dfc49aa793a386722800be9433f94c5563.tar.gz
android_packages_apps_Trebuchet-955806dfc49aa793a386722800be9433f94c5563.tar.bz2
android_packages_apps_Trebuchet-955806dfc49aa793a386722800be9433f94c5563.zip
Just for now, for fun
Change-Id: I4105b4299da59f5f34e280f7e7386f6e0e9c1b1a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Workspace.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 0d647e333..b5c0b29c9 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1323,14 +1323,16 @@ public class Workspace extends SmoothPagedView
float progress = (1.0f * scrollDelta) /
(getScrollForPage(index + 1) - getScrollForPage(index));
+ progress = Math.max(0, progress);
setBackgroundAlpha(progress * 0.8f);
+ float transY = progress * (getViewportHeight() - getPageIndicator().getTop());
if (mLauncher.getHotseat() != null) {
- mLauncher.getHotseat().setTranslationX(translationX);
+ mLauncher.getHotseat().setTranslationY(transY);
}
if (getPageIndicator() != null) {
- getPageIndicator().setTranslationX(translationX);
+ getPageIndicator().setAlpha(1 - progress);
}
}
}