diff options
author | Adam Cohen <adamcohen@google.com> | 2013-11-26 15:20:12 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-11-26 15:20:12 -0800 |
commit | 0a23daaca14ab7fd107ee3e4043b5793760e02c1 (patch) | |
tree | 7407fb8697fcee5135145bd3c6d00c249c02b9a1 /src | |
parent | 52aa0636c6caef0bd2601fb1f4ec06a34d9ac7a2 (diff) | |
parent | 166ebd4da5d85195bd1f562572f468726ade548f (diff) | |
download | android_packages_apps_Trebuchet-0a23daaca14ab7fd107ee3e4043b5793760e02c1.tar.gz android_packages_apps_Trebuchet-0a23daaca14ab7fd107ee3e4043b5793760e02c1.tar.bz2 android_packages_apps_Trebuchet-0a23daaca14ab7fd107ee3e4043b5793760e02c1.zip |
am 166ebd4d: De-parent custom content view before adding to custom content screen
* commit '166ebd4da5d85195bd1f562572f468726ade548f':
De-parent custom content view before adding to custom content screen
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index b1b50bf5e..02949e7dd 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -619,6 +619,12 @@ public class Workspace extends SmoothPagedView if (customContent instanceof Insettable) { ((Insettable)customContent).setInsets(mInsets); } + + // Verify that the child is removed from any existing parent. + if (customContent.getParent() instanceof ViewGroup) { + ViewGroup parent = (ViewGroup) customContent.getParent(); + parent.removeView(customContent); + } customScreen.removeAllViews(); customScreen.addViewToCellLayout(customContent, 0, 0, lp, true); mCustomContentDescription = description; |