我正在尝试在对话框上使用自定义视图。我不断收到错误
07-09 18:03:38.740: E/AndroidRuntime(22032): java.lang.IllegalStateException:
The specified child already has a parent. You must call removeView()
on the child's parent first.
这是我的代码
LayoutInflater inflater = getLayoutInflater();
View dialoglayout = inflater.inflate(R.layout.activity_mine1,
(ViewGroup) findViewById(R.layout.mine1));
mine1 = new AlertDialog.Builder(this);
mine1.setView(dialoglayout);
mine1.show();
我该如何解决?(大概我所要做的就是删除视图。)