From f7bef2545ba45e8405dd5a00c0d276d669bf0ad0 Mon Sep 17 00:00:00 2001 From: d34d Date: Sun, 16 Nov 2014 15:31:37 -0800 Subject: Exclude empty and custom screens when centering wallpaper If the user has CM Home or Google Now enabled then getChildCount() will include those as well. We need to exclude those screens when determining if the wallpaper should be centered for one screen. Change-Id: I702feb752b37d8c714352a2e18f0c61e6f640ba9 --- src/com/android/launcher3/Workspace.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 9813e6ca0..478b261e9 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1390,7 +1390,7 @@ public class Workspace extends SmoothPagedView } private float wallpaperOffsetForCurrentScroll() { - if (getChildCount() <= 1) { + if (getNumScreensExcludingEmptyAndCustom() <= 1) { return mWallpaperIsLiveWallpaper ? 0 : 0.5f; } -- cgit v1.2.3