From 37990b4b4fc241fcf12a4b6d1725c69605b26605 Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Tue, 25 Sep 2012 15:14:30 -0700 Subject: [PATCH] Fix # 6925851: Workspace page spacing gets messed up Change-Id: I694fa1e04049e35a415b1f1a85759e501fec6258 --- src/com/android/launcher2/Workspace.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 7d17249970..77cb46732e 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -98,6 +98,7 @@ public class Workspace extends SmoothPagedView private float mOverScrollMaxBackgroundAlpha = 0.0f; private float mWallpaperScrollRatio = 1.0f; + private int mOriginalPageSpacing; private final WallpaperManager mWallpaperManager; private IBinder mWindowToken; @@ -273,6 +274,7 @@ public class Workspace extends SmoothPagedView public Workspace(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mContentIsRefreshable = false; + mOriginalPageSpacing = mPageSpacing; mDragEnforcer = new DropTarget.DragEnforcer(context); // With workspace, data is available straight from the get-go @@ -1594,7 +1596,7 @@ public class Workspace extends SmoothPagedView setLayoutScale(finalScaleFactor); } } else { - setPageSpacing(PagedView.AUTOMATIC_PAGE_SPACING); + setPageSpacing(mOriginalPageSpacing); setLayoutScale(1.0f); }