使用setView方法弹出自定义Dialog
final View saveFolder = inflater.inflate(R.layout.save_folder, null);
new AlertDialog.Builder(this).setTitle(R.string.add_folder_title)
.setView(saveFolder).setPositiveButton(
R.string.positive_button_text,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
.......
dialog.cancel();
}
}).setNegativeButton(R.string.negative_button_text,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
dialog.cancel();
}
}).create().show();