转自: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();

更多相关文章

  1. Android实现自动文本框提示功能
  2. android设置eclipse中的自动提示功能
  3. Android——系统提示对话框(AlertDialog)
  4. android利用handler实现打地鼠游戏
  5. 拷贝的Android源码不能单独编译mmm命令提示找不到
  6. Android五子棋游戏设计与实现
  7. Android开源项目:捕鱼达人游戏源代码
  8. Android实现拼图小游戏
  9. android logcat鼠标悬浮提示过快

随机推荐

  1. Android(安卓)常用UI控件的一些属性设置(
  2. android四大组件学习总结
  3. android 进程与线程 - 开发文档翻译 - 线
  4. Service的xml属性解析
  5. Android(安卓)编译系统分析
  6. android 进程与线程 - 开发文档翻译 - 进
  7. 说说 Android(安卓)的常见 UI 控件
  8. (一)Android事件分发机制 - View篇
  9. Android中的Parcel机制 实现Bundle传递对
  10. Android系列之浅谈Android(安卓)3D旋转