summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Scheff <clark@cyngn.com>2014-11-15 01:36:07 (GMT)
committerClark Scheff <clark@cyngn.com>2014-11-15 01:36:07 (GMT)
commiteacfd7fd535b4510cc43400c145c46db10110d08 (patch)
tree3a68dfb41807524e3a5477d23395e95a0dcc55f8
parent67e30486bddc230a64bf84c265127e584a6d7096 (diff)
downloadandroid_packages_apps_Trebuchet-eacfd7fd535b4510cc43400c145c46db10110d08.zip
android_packages_apps_Trebuchet-eacfd7fd535b4510cc43400c145c46db10110d08.tar.gz
android_packages_apps_Trebuchet-eacfd7fd535b4510cc43400c145c46db10110d08.tar.bz2
Center wallpaper when only one screen
Change-Id: I80a4ca3052aadd11712cfc647a4304bf38229cf0
-rw-r--r--src/com/android/launcher3/Workspace.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index ecf618c..9813e6c 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1337,7 +1337,7 @@ public class Workspace extends SmoothPagedView
float mAnimationStartOffset;
private final int ANIMATION_DURATION = 250;
// Don't use all the wallpaper for parallax until you have at least this many pages
- private final int MIN_PARALLAX_PAGE_SPAN = 3;
+ private final int MIN_PARALLAX_PAGE_SPAN = 2;
int mNumScreens;
boolean mCompletedInitialOffset;
@@ -1391,7 +1391,7 @@ public class Workspace extends SmoothPagedView
private float wallpaperOffsetForCurrentScroll() {
if (getChildCount() <= 1) {
- return 0;
+ return mWallpaperIsLiveWallpaper ? 0 : 0.5f;
}
// Exclude the leftmost page