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


參考資料:

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()也如此處理即可

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM