Say I have a (programatically created) parent LinearLayout parent1 and I add a (programatically created) childA layout with parent1.addView(childA); then I set up childA in some complex way – perhaps it has its own children within it. Now can I subsequently somehow un-link it from parent1 without damaging any of the information within childA so that I can re-use it using parent2.addView(childA)?
Say I have a (programatically created) parent LinearLayout parent1 and I add a (programatically
Share
Yes, you can!
You only need to guarantee you don’t add it to another view before removing it from the previous parent.
EDIT: