android AlertDialog标准化

	  public void createConfirmDialog(Activity activity, String message){
		  AlertDialog.Builder alert = new AlertDialog.Builder(activity);
			alert.setTitle(message)
					.setPositiveButton(activity.getResources().getString(R.string.call),
							new DialogInterface.OnClickListener() {
								public void onClick(DialogInterface dialog,
										int which) {
									
								}
							})
					.setNegativeButton(activity.getResources().getString(R.string.cancel),
							new DialogInterface.OnClickListener() {
								public void onClick(DialogInterface dialog,
										int which) {
									
								}
							});

			alert.create().show();
	  }

猜你喜欢

转载自dasheny.iteye.com/blog/2176241