Open liuchenGG opened 7 years ago
同问
同问,有人知道怎么解决吗?
mDropDownMenu.setDropDownMenu(Arrays.asList(headers), popupViews, recyclerView);
mDropDownMenu.setDropDownMenu(Arrays.asList(headers), popupViews, recyclerView);
The specified child already has a parent. You must call removeView() on the child's parent first.
这个错误有人碰到过吗
其中view就是有包含RecyclerView的布局 View view = LayoutInflater.from(this).inflate(R.layout.layout_recyclerview,null); RecyclerView recyclerView = view.findViewById(R.id.mRecyclerview); 。。省略adapter。。。 mDropDownMenu.setDropDownMenu(Arrays.asList(headers), popupViews, view);