1、java.lang.IllegalStateException The specified child already has a parent. You must call removeView() on the child's parent first.
在自定义Fragment的时候,在使用下面代码来创建View的时候,出现的异常
LayoutInflater.from(Context).inflate(R.layout.xxx,viewGroup)
需要改成
LayoutInflater.from(Context).inflate(R.layout.xxx,viewGroup,false)
浙公网安备 33010602011771号