AlertDialog.Builder builder = new AlertDialog.Builder(this);
              builder.setTitle("你确定要退出吗?");
              builder.setPositiveButton("确定",new DialogInterface.OnClickListener() {
                
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    // TODO Auto-generated method stub
                    System.exit(0); 
                }
            });
              
             builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
                
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    // TODO Auto-generated method stub  
                    return;
                }
            });
               
              builder.show();

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2021-06-11
  • 2021-06-11
  • 2022-12-23
猜你喜欢
  • 2022-02-04
  • 2022-12-23
  • 2022-01-05
  • 2021-06-19
  • 2021-06-26
  • 2022-12-23
相关资源
相似解决方案