AlertDialog自定义布局

来源:互联网 发布:java中的io 编辑:程序博客网 时间:2024/04/30 12:06
 private AlertDialog mDialog = null;    private void selCDType() {        mDialog = new AlertDialog.Builder(mActivity).create();        mDialog.show();        mDialog.getWindow().setContentView(R.layout.dialog_del_user);        mEdtCode = (EditText) mDialog.getWindow().findViewById(R.id.edt_code);//        InputMethodManager imm = (InputMethodManager) mActivity//                .getSystemService(Context.INPUT_METHOD_SERVICE);//        imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);//        mEdtCode.setFocusableInTouchMode(true);//        mEdtCode.requestFocus();        mDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);        Button btn_ok = (Button) mDialog.getWindow().findViewById(R.id.btn_ok);
原创粉丝点击