Loading src/com/android/launcher3/PagedView.java +1 −7 Original line number Diff line number Diff line Loading @@ -268,8 +268,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc protected final Rect mInsets = new Rect(); protected int mFirstChildLeft; public interface PageSwitchListener { void onPageSwitch(View newPage, int newPageIndex); } Loading Loading @@ -899,10 +897,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc requestLayout(); } protected int getFirstChildLeft() { return mFirstChildLeft; } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { if (!mIsDataReady || getChildCount() == 0) { Loading @@ -928,7 +922,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc int verticalPadding = getPaddingTop() + getPaddingBottom(); int childLeft = mFirstChildLeft = offsetX + (screenWidth - getChildWidth(startIndex)) / 2; int childLeft = offsetX + (screenWidth - getChildWidth(startIndex)) / 2; if (mPageScrolls == null || getChildCount() != mChildCountOnLastLayout) { mPageScrolls = new int[getChildCount()]; } Loading src/com/android/launcher3/Workspace.java +1 −3 Original line number Diff line number Diff line Loading @@ -1199,10 +1199,8 @@ public class Workspace extends SmoothPagedView // TODO: do different behavior if it's a live wallpaper? // Sometimes the left parameter of the pages is animated during a layout transition; // this parameter offsets it to keep the wallpaper from animating as well int offsetForLayoutTransitionAnimation = isLayoutRtl() ? getPageAt(getChildCount() - 1).getLeft() - getFirstChildLeft() : 0; int adjustedScroll = getScrollX() - firstPageScrollX - offsetForLayoutTransitionAnimation; getScrollX() - firstPageScrollX - getLayoutTransitionOffsetForPage(0); float offset = Math.min(1, adjustedScroll / (float) scrollRange); offset = Math.max(0, offset); // Don't use up all the wallpaper parallax until you have at least Loading Loading
src/com/android/launcher3/PagedView.java +1 −7 Original line number Diff line number Diff line Loading @@ -268,8 +268,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc protected final Rect mInsets = new Rect(); protected int mFirstChildLeft; public interface PageSwitchListener { void onPageSwitch(View newPage, int newPageIndex); } Loading Loading @@ -899,10 +897,6 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc requestLayout(); } protected int getFirstChildLeft() { return mFirstChildLeft; } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { if (!mIsDataReady || getChildCount() == 0) { Loading @@ -928,7 +922,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc int verticalPadding = getPaddingTop() + getPaddingBottom(); int childLeft = mFirstChildLeft = offsetX + (screenWidth - getChildWidth(startIndex)) / 2; int childLeft = offsetX + (screenWidth - getChildWidth(startIndex)) / 2; if (mPageScrolls == null || getChildCount() != mChildCountOnLastLayout) { mPageScrolls = new int[getChildCount()]; } Loading
src/com/android/launcher3/Workspace.java +1 −3 Original line number Diff line number Diff line Loading @@ -1199,10 +1199,8 @@ public class Workspace extends SmoothPagedView // TODO: do different behavior if it's a live wallpaper? // Sometimes the left parameter of the pages is animated during a layout transition; // this parameter offsets it to keep the wallpaper from animating as well int offsetForLayoutTransitionAnimation = isLayoutRtl() ? getPageAt(getChildCount() - 1).getLeft() - getFirstChildLeft() : 0; int adjustedScroll = getScrollX() - firstPageScrollX - offsetForLayoutTransitionAnimation; getScrollX() - firstPageScrollX - getLayoutTransitionOffsetForPage(0); float offset = Math.min(1, adjustedScroll / (float) scrollRange); offset = Math.max(0, offset); // Don't use up all the wallpaper parallax until you have at least Loading