summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppsCustomizePagedView.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2014-08-27 21:27:01 -0700
committerAdam Cohen <adamcohen@google.com>2014-08-28 10:10:13 -0700
commit69ed200530058afceedad1abe6c15da3b0c61909 (patch)
tree17ace65519f05b1c0dc771b6708fc72fafac4818 /src/com/android/launcher3/AppsCustomizePagedView.java
parent74dc410bd19e07cde8702ad9c33dc1c25332d664 (diff)
downloadandroid_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/AppsCustomizePagedView.java')
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java10
1 files changed, 8 insertions, 2 deletions
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());
+ }
+ });
}
}
}