Á¾·á ´ÙÀ̾ó·Î±× [Android] |
|
|
 |
8³â Àü |
new AlertDialog.Builder(this).setTitle("Áú¹®").setMessage("Á¾·á ÇϽðڽÀ´Ï±î?")
.setPositiveButton("¿¹", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
System.exit(0);
}
} ).setNegativeButton("¾Æ´Ï¿ä",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
})
.show();
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(event.getKeyCode() == KeyEvent.KEYCODE_BACK){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Á¾·á ÇÒ±î¿ä ? ")
.setCancelable(false)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
System.exit(0);
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
return super.onKeyDown(keyCode, event);
} |
|
̵̧ : 292 |
̵̧
¸ñ·Ï
|
|