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
This commit is contained in:
Adam Cohen committed 2014-08-28 10:10:13 -07:00
1 parent 74dc410bd1
commit 69ed200530
3 files changed
+9 -5

No files matched your search

@@ -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());
}
});
}
}
}