报错的代码是:
The specified child already has a parent. You must call removeView() on the child's parent first
public void startClick(View view){
LayoutInflater inflater = LayoutInflater.from(getApplication());
mFloatLayout = (LinearLayout)inflater.inflate(R.layout.province_item, null);
builder = new AlertDialog.Builder(MainActivity.this)
.setView(mFloatLayout);
ad = builder.show();
}
解决alaert.builder二次调用报错的bug,布布扣,bubuko.com
原文地址:http://blog.csdn.net/howlaa/article/details/37697793