首页 > 技术文章 > The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i

smilefortoday 2014-09-17 15:05 原文

参考资料:

http://blog.csdn.net/competerh_programing/article/details/7377950

在创建Dialog的时候,出现:

The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i 

的错误提示。解决方法:

将代码:

bulider.setPositiveButton("确定", new OnClickListener() {

换成:

bulider.setPositiveButton("确定", new DialogInterface.OnClickListener() {

即可解决问题

同样,.setNegativeButton()也如此处理即可

 

推荐阅读