摘要:
在往一个控件添加一个view后,再去添加一个view就会抛出异常出来 如下:java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.1 // 如果view有父元素 全部移除 否则子元素有父元素再添加父元素会报错2 ViewGroup parent = (ViewGroup) view.getParent();3 if(parent != nu... 阅读全文