转自:http://hi.baidu.com/ittdt/item/d932cf37f486f886c3cf29ea
new AlertDialog.Builder(MainEngine.context)
//.setTitle("提示")
.setMessage("确定要退出游戏吗?")
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0,
int arg1) {
// TODO Auto-generated method stub
// finish();
android.os.Process.killProcess(android.os.Process.myPid());
}
})
.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0,
int arg1) {
// TODO Auto-generated method stub
}
}).show();
Android 退出提示框 代码,布布扣,bubuko.com
原文:http://www.cnblogs.com/cugwx/p/3795383.html