diff options
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index a2ed9858a..264e83907 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -417,8 +417,12 @@ public abstract class PagedView extends ViewGroup { if (heightMode == MeasureSpec.AT_MOST) { heightSize = maxChildHeight + verticalPadding; } + if (childCount > 0) { + mMaxScrollX = getChildOffset(childCount - 1) - getRelativeChildOffset(childCount - 1); + } else { + mMaxScrollX = 0; + } - mMaxScrollX = getChildOffset(childCount - 1) - getRelativeChildOffset(childCount - 1); setMeasuredDimension(widthSize, heightSize); } |