标签:style blog color os cti new
//String 是用来显示提示内容 protected void dialog(String result) { AlertDialog.Builder builder = new Builder(MainActivity.this); builder.setMessage(result); builder.setTitle("提示"); builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog,int which) { passwordTextId.setText(""); } }); builder.setNegativeButton("退出", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog,int which) { dialog.dismiss(); MainActivity.this.finish(); } }); builder.create().show(); }
弹出一个对话框并且对是和否绑定事件,布布扣,bubuko.com
标签:style blog color os cti new
原文地址:http://www.cnblogs.com/WangShenCode/p/3819694.html