diff options
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher3/AppsCustomizePagedView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index 558d8e99b..a92bff1b6 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -366,8 +366,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen // This code triggers requestLayout so must be posted outside of the // layout pass. public void run() { - setDataIsReady(); - onDataReady(getMeasuredWidth(), getMeasuredHeight()); + if (isAttachedToWindow()) { + setDataIsReady(); + onDataReady(getMeasuredWidth(), getMeasuredHeight()); + } } }); } |