am 0008ff9b: am d7351228: am 0a23daac: am 166ebd4d: De-parent custom content view before adding to custom content screen
* commit '0008ff9b365460757776fd048e0e45690f5548af': De-parent custom content view before adding to custom content screen
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user