当前位置: 代码迷 >> 综合 >> [已]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.

热度:71   发布时间:2023-12-16 15:17:37.0

二级PopupWindow 在执行的时候报错:

The specified child already has a parent. You must call removeView() on the child's parent first.


原因:

在第二级的setContextView 的时候使用了第一级的listView,


解决办法:

在第二级的setContextView 的时候使用第二级别的listView

mProviderPopupWindow.setContentView(mProviderListView);


参考:

http://blog.csdn.net/yaolingrui/article/details/7339913

  相关解决方案