diff options
author | Winson Chung <winsonc@google.com> | 2011-03-18 11:50:16 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-18 11:50:16 -0700 |
commit | f1883646e051c5d387c52563aa47c2246863ba00 (patch) | |
tree | 707fefe165b102d61ae2f50b9b54328fe835c9da | |
parent | d40fcd387d1ed10b1a912ad3cbc136e63958690e (diff) | |
parent | 34b23d5c8ce33450bd7640559bffcd77c5b6fb4d (diff) | |
download | packages_apps_trebuchet-f1883646e051c5d387c52563aa47c2246863ba00.zip packages_apps_trebuchet-f1883646e051c5d387c52563aa47c2246863ba00.tar.gz packages_apps_trebuchet-f1883646e051c5d387c52563aa47c2246863ba00.tar.bz2 |
Merge "Fixing an issue where other pages were taking on the min width of the widget page."
-rw-r--r-- | src/com/android/launcher2/CustomizePagedView.java | 6 | ||||
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java index 5c61b0b..332f6e4 100644 --- a/src/com/android/launcher2/CustomizePagedView.java +++ b/src/com/android/launcher2/CustomizePagedView.java @@ -1128,8 +1128,10 @@ public class CustomizePagedView extends PagedViewWithDraggableItems } // Set a min page width for PagedView layout if we have more than a single page - if (enforceMinimumPagedWidths) { - setMinimumWidthOverride((childCount > 1) ? mMinPageWidth : 0); + if (enforceMinimumPagedWidths && childCount > 1) { + setMinimumWidthOverride(mMinPageWidth); + } else { + resetMinimumWidthOverride(); } // Bound the current page index diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index e7ecb99..1da08cd 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -1177,6 +1177,9 @@ public abstract class PagedView extends ViewGroup { protected void setMinimumWidthOverride(int minimumWidth) { mMinimumWidth = minimumWidth; } + protected void resetMinimumWidthOverride() { + mMinimumWidth = 0; + } protected int getChildWidth(int index) { return Math.max(mMinimumWidth, getChildAt(index).getMeasuredWidth()); |