mDialog = new Dialog(this, R.style.chooseUserDialogTheme); mDialog.setTitle(R.string.doctor); View rootView = LayoutInflater.from(this).inflate( R.layout.activity_healthreport, null); rootView.requestFocus(); mDialog.setContentView(rootView); WindowManager.LayoutParams params = mDialog.getWindow().getAttributes(); params.width = 800;
params.hight = 500; mDialog.getWindow().setAttributes(params); mDialog.setCancelable(true); mDialog.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { mSynthesizerPlayer.Destory(); mSynthesizerPlayer.cancel(); finish(); } }); mDialog.show();
设置自定义Dialog的长宽
最新推荐文章于 2024-08-13 08:36:12 发布