关于android创建对话框报错The method setPositiveButton(int, DialogInterface.OnClickListener) in the type Alert
16lz
2021-01-23
http://blog.csdn.net/xiaoyuan511/article/details/17114761
关于android创建对话框报错The method setPositiveButton(int, DialogInterface.OnClickListener) in the type Alert
原创 2013年12月04日 10:43:35The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder is not applicable for the arguments (String, new View.OnClickListener(){})
Here is your solution, you did a silly mistake there buddy.
It should not be
.setNegativeButton("Don't Remind", new OnClickListener()
It should be
.setNegativeButton("Don't Remind", new DialogInterface.OnClickListener()
只要这样写,就不报错了!本人水平有限,也不知道什么原因,希望对你能有帮助!
更多相关文章
- Android中RelativeLayout的字符水平(垂直居中)对齐
- LinearLayout水平居中控制
- Android自定义对话框(Dialog)
- 常用的android弹出对话框
- Android 实现 选择文件对话框
- LinearLayout中实现水平方向上的两个textview一个居左,一个居右的
- Android UI学习 - 对话框
- Android中创建对话框(确定取消对话框、单选对话框、多选对话框)
- 《Android面试宝典》学习笔记(第四章:对话框、信息提示和菜单)