diff options
author | Adam Cohen <adamcohen@google.com> | 2014-08-28 17:10:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-28 17:10:42 +0000 |
commit | 67ef1c406cb8a288c5bcdb825a26e6020e0a6cac (patch) | |
tree | d9fa57f606aefa8c40f11f168ae6708b422f692f | |
parent | fbfa2cc609782726047b28262bcd53a1ae8f07ef (diff) | |
parent | 69ed200530058afceedad1abe6c15da3b0c61909 (diff) | |
download | android_packages_apps_Trebuchet-67ef1c406cb8a288c5bcdb825a26e6020e0a6cac.tar.gz android_packages_apps_Trebuchet-67ef1c406cb8a288c5bcdb825a26e6020e0a6cac.tar.bz2 android_packages_apps_Trebuchet-67ef1c406cb8a288c5bcdb825a26e6020e0a6cac.zip |
Merge "Fix regression which was causing requestLayout in layout pass" into ub-now-porkchop
-rw-r--r-- | src/com/android/launcher3/AppsCustomizeCellLayout.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/AppsCustomizePagedView.java | 10 | ||||
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/com/android/launcher3/AppsCustomizeCellLayout.java b/src/com/android/launcher3/AppsCustomizeCellLayout.java index 76b81d2d1..a50fb6821 100644 --- a/src/com/android/launcher3/AppsCustomizeCellLayout.java +++ b/src/com/android/launcher3/AppsCustomizeCellLayout.java @@ -68,4 +68,4 @@ public class AppsCustomizeCellLayout extends CellLayout implements Page { children.getChildAt(j).setOnKeyListener(null); } } -}
\ No newline at end of file +} diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index 03e1e5642..558d8e99b 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -362,8 +362,14 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen if (!isDataReady()) { if ((LauncherAppState.isDisableAllApps() || !mApps.isEmpty()) && !mWidgets.isEmpty()) { - setDataIsReady(); - onDataReady(getMeasuredWidth(), getMeasuredHeight()); + post(new Runnable() { + // This code triggers requestLayout so must be posted outside of the + // layout pass. + public void run() { + setDataIsReady(); + onDataReady(getMeasuredWidth(), getMeasuredHeight()); + } + }); } } } diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 54aa24ef6..0434faff5 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -996,9 +996,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc } if (mFirstLayout && mCurrentPage >= 0 && mCurrentPage < getChildCount()) { - setHorizontalScrollBarEnabled(false); updateCurrentPageScroll(); - setHorizontalScrollBarEnabled(true); mFirstLayout = false; } |