报的提示错误:
The specified child already has a parent. You must call removeView() on the child's parent first.
解决方法有两种
1.动态生成EditText
et1 = new EditText(this);
builder.setView(et1);
2. 放在另一个xml中,用inflater
LayoutInflater inflater = LayoutInflater.from(this);
View textEntryView = inflater.inflate(R.layout.test1, null);
et1 = (EditText)textEntryView.findViewById(R.id.editText1);
builder.setView(textEntryView ); 注意这里是textEntryView ,不是et1