View view = LayoutInflater.from(activity).inflate(R.layout.dialog_update_prompt, null);
((TextView) view.findViewById(R.id.dialog_update_tv_title)).setText(activity .getString(R.string.update_find_new_version) + update.content.versionInfo); ((TextView) view.findViewById(R.id.dialog_update_tv_content)).setText(msg);
dialog.setCancelBtnText(R.string.cancel).setConfirmBtnText(R.string.update_immediately) .setDialogContentView(view) //通过这个方法添加到layout布局中
//下面为添加view的方法
public CommonDialog setDialogContentView(View contentView) { if(contentView.getParent() == null) { this.contentLayout.addView(contentView); } return this; }//改layout为布局protected RelativeLayout contentLayout;