Android AlertDialog
확인/취소
private void createAlert(){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("종료확인") .setMessage("앱을 종료하시겠습니까?") .setCancelable(false) .setPositiveButton("확인", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { finish(); } }) .setNegativeButton("취소", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog dialog = builder.create(); dialog.show(); }