summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2011-09-01 13:10:40 -0700
committerAdam Cohen <adamcohen@google.com>2011-09-01 13:10:40 -0700
commit5037a0b02a720ae14cbf673d7d5bb148f5a524c8 (patch)
treeb3f0ac210726072f35bbb579c1f76ee081c414a7 /src/com/android
parent3c81a3835b27bbacf8c87eedfc244528a22973ad (diff)
downloadandroid_packages_apps_Trebuchet-5037a0b02a720ae14cbf673d7d5bb148f5a524c8.tar.gz
android_packages_apps_Trebuchet-5037a0b02a720ae14cbf673d7d5bb148f5a524c8.tar.bz2
android_packages_apps_Trebuchet-5037a0b02a720ae14cbf673d7d5bb148f5a524c8.zip
Fix small issue with wallpaper jump
Change-Id: I1f9ad36b7c96528f70b82804f2505bc97c453a32
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher2/Workspace.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index d191d0739..29da4bf2f 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -819,23 +819,23 @@ public class Workspace extends SmoothPagedView
@Override
protected void updateCurrentPageScroll() {
super.updateCurrentPageScroll();
- computeWallpaperScrollRatio();
+ computeWallpaperScrollRatio(mCurrentPage);
}
@Override
protected void snapToPage(int whichPage) {
super.snapToPage(whichPage);
- computeWallpaperScrollRatio();
+ computeWallpaperScrollRatio(whichPage);
}
- private void computeWallpaperScrollRatio() {
+ private void computeWallpaperScrollRatio(int page) {
// Here, we determine what the desired scroll would be with and without a layout scale,
// and compute a ratio between the two. This allows us to adjust the wallpaper offset
// as though there is no layout scale.
float layoutScale = mLayoutScale;
- int scaled = getChildOffset(mCurrentPage) - getRelativeChildOffset(mCurrentPage);
+ int scaled = getChildOffset(page) - getRelativeChildOffset(page);
mLayoutScale = 1.0f;
- float unscaled = getChildOffset(mCurrentPage) - getRelativeChildOffset(mCurrentPage);
+ float unscaled = getChildOffset(page) - getRelativeChildOffset(page);
mLayoutScale = layoutScale;
if (scaled > 0) {
mWallpaperScrollRatio = (1.0f * unscaled) / scaled;