首页 > 移动平台 > 详细

android viewp嵌套Fragment时遇到The specified child already has a parent. You must call removeView()问题的解决

时间:2014-11-27 14:28:05      阅读:265      评论:0      收藏:0      [点我收藏+]
<span style="font-size:18px;">@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		if (root == null) {
			root = inflater.inflate(R.layout.fragment_pull_listview, container, false);
		} else {
			ViewGroup p = (ViewGroup) root.getParent();
			if (p != null) {
				p.removeAllViewsInLayout();
			}
		}
		return root;
	}</span>

android viewp嵌套Fragment时遇到The specified child already has a parent. You must call removeView()问题的解决

原文:http://blog.csdn.net/coderinchina/article/details/41545533

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!