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
2014-08-27 21:27:01 -07:00
parent 74dc410bd1
commit 69ed200530
3 changed files with 9 additions and 5 deletions
@@ -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());
}
});
}
}
}