Comments (6)
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
from dropdownmenu.
现在我项目中都是用的这段代码 没出现java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
有可能是你的子View没有移除干净导致的 你在检查下
from dropdownmenu.
或者调用的时候直接判断containerView有没有子View 如果有调用)containerView.removeAllViews();应该也是可以的
from dropdownmenu.
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
你可以看下你add的view是不是同一个引用
from dropdownmenu.
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
出现同样的问题,加了以上判断也没用。大概是添加的 子view本身存在父容器吧。比如 SmartRefreshLayout,这种问题该怎么解决。
from dropdownmenu.
看到这个,终于理解了,我的布局是在xml中,这样的话就很不方便了,看来得换种方式了。
from dropdownmenu.
Related Issues (20)
- 添加视图前没有做清理操作,导致无法动态改变tab个数和内容,动态改变是追加添加的视图
- 清空的处理没有吗?
- 怎么遮盖navigationbar HOT 4
- 如何获得点击Tabs是第几个?
- 提一个需求 HOT 1
- ddmaskColor设置不管用?
- 控件里加了RecyclerView就报错 HOT 5
- 怎么设置默认选中 HOT 9
- 这,,,代码 HOT 1
- 能不能动态更改标题问题呀?
- 这个项目是否可以实现动态设置数据源
- 可以设置Menu里每个Item的样式吗。 HOT 1
- 我魔改扩展了你的代码
- 默认选中 HOT 1
- 怎样设置成想要的长度,和特定的位置 HOT 1
- 怎么获取选中的文字啊
- 怎么拿到tab的点击事件?怎么改呢 HOT 1
- 必须作为父布局这个限制太多了 HOT 1
- 弹窗弹出时底部视图被覆盖
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropdownmenu.