对话框关联两个Layout时

 public void bt_2(View v)
    {
       final View view=View.inflate(this, R.layout.shurudianhuahaoma, null);
        et_1=(EditText)view.findViewById(R.id.et_1);
        new AlertDialog.Builder(this)
                .setTitle("请输入电话号码")
                .setView(view)
                .show();
    }

 

et_1=(EditText)view.findViewById(R.id.et_1);要写在弹出对话框的地方

posted @ 2016-05-14 09:39  百事没事  阅读(186)  评论(0编辑  收藏  举报