diff options
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher3/AppsCustomizePagedView.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index a92bff1b6..1bd290777 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -366,7 +366,11 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen // This code triggers requestLayout so must be posted outside of the // layout pass. public void run() { - if (isAttachedToWindow()) { + boolean attached = true; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + attached = isAttachedToWindow(); + } + if (attached) { setDataIsReady(); onDataReady(getMeasuredWidth(), getMeasuredHeight()); } |