android 弹出对话框

Dialog alertDialog = new AlertDialog.Builder(DkfpsqlrActivity.this)
				.setTitle("确定提交信息吗")
				.setPositiveButton(getResources().getString("确定"), new OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						// 保存操作
						webServiceHandler = new WebServiceHandler();
						submitThread = new DkfpSqThread();
						submitThread.start();
					}
				})
				.setNegativeButton("取消", new DialogInterface.OnClickListener() {    
					@Override  
					public void onClick(DialogInterface dialog, int which) {  
						// 点击“返回”后的操作,这里不设置没有任何操作   
					}  
				}).create();
				alertDialog.show();

 更多参考http://xys289187120.blog.51cto.com/3361352/657562

猜你喜欢

转载自pyez1158.iteye.com/blog/2035272