设置自定义Dialog的长宽

	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();

你可能感兴趣的:(android,小知识)