diff options
author | Adam Cohen <adamcohen@google.com> | 2014-08-27 21:27:01 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2014-08-28 10:10:13 -0700 |
commit | 69ed200530058afceedad1abe6c15da3b0c61909 (patch) | |
tree | 17ace65519f05b1c0dc771b6708fc72fafac4818 /src/com/android/launcher3 | |
parent | 74dc410bd19e07cde8702ad9c33dc1c25332d664 (diff) | |
download | android_packages_apps_Trebuchet-69ed200530058afceedad1abe6c15da3b0c61909.tar.gz android_packages_apps_Trebuchet-69ed200530058afceedad1abe6c15da3b0c61909.tar.bz2 android_packages_apps_Trebuchet-69ed200530058afceedad1abe6c15da3b0c61909.zip |
Fix regression which was causing requestLayout in layout pass
-> This caused funky layout issues with views not appearing
on devices prior to K in addition to log spam.
issue 17282728
Change-Id: Id05856ba2ef3de3a8a636ba9b4b46ddef3eff75e
Diffstat (limited to 'src/com/android/launcher3')
-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; } |