自定义Dialog,第二次点击item报The specified child already has a parent. You must call removeView() on the chil
来源:互联网 发布:龙渊网络 编辑:程序博客网 时间:2024/06/15 18:09
原来的对话框中间的view是可以移除的,代码:
contentView为外来传入的,当第一次对对话框进行确认事件的时候没问题,但第二次的时候就会报错:
The specified child already has a parent. You must call removeView() on the child's parent first
原因分析:
第一次显示已经 有了一个ViewGroup,但第二次再次进入的时候,ViewGroup为同一个,在AS里面这种是不允许的,在eclipse里面不会报错。改正后的代码:
0 0
- 自定义Dialog,第二次点击item报The specified child already has a parent. You must call removeView() on the chil
- The specified child already has a parent. You must call removeView() on the chil
- 关于Dialog 俩次点击报错 :The specified child already has a parent. You must call removeView() on the child's
- Android使用自定义对话框报错:The specified child already has a parent. You must call removeView() on the...
- Android使用自定义对话框报错:The specified child already has a parent. You must call removeView() on the...
- Android使用自定义对话框报错:The specified child already has a parent. You must call removeView() on the...
- Android自定义Dialog二次调用报错解决方法:The specified child already has a parent. You must call removeView()
- 总是报The specified child already has a parent. You must call removeView() on the child's parent first.
- . 报错 specified child already has a parent. You must call removeView() on the child's parent first
- 替换Fragment 报错 The specified child already has a parent. You must call removeView() on the child's pa
- The specified child already has a parent. You must call removeView() on the
- 关于向父view添加相同的view问题!The specified child already has a parent. You must call removeView() on the chil
- 报错:The specified child already has a parent. You must call removeView
- The specified child already has a parent. You must call removeView() on the child's parent first.
- 二、The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first
- The specified child already has a parent. You must call removeView() on the child's parent first
- The specified child already has a parent. You must call removeView() on the child's parent first.
- 文件下载
- ERROR 1045 (28000)Access denied for user root localhost using passwordNO
- qualcomm QSD MSM APQ区别
- chromium浏览器的编译
- 2017 阿里巴巴矢量图标库 导入所选图标到jsp页面步骤
- 自定义Dialog,第二次点击item报The specified child already has a parent. You must call removeView() on the chil
- cmd打开某个目录下的程序
- 前端插件Bootstrap之下拉选学习(一)
- eclipse 等号左边代码自动补全,自动提示返回对象
- vi编辑器(1)
- CSDN专访雷果国:从1.5K到18K 一个程序员的5年成长之路
- CentOS 6.5下Squid代理服务器的安装与配置
- C++实现哈夫曼编码--使用哈夫曼编码树压缩和解压缩
- 表类型,存储引擎的选择