progressdialog.setButton(DialogInterface.BUTTON_POSITIVE, "確定", new DialogInterface(){ @Override public void onClick(DialogInterface dialog,int which) { Toast.makeText(MainActivity3.this, "welcome", Toast.LENGTH_SHORT).show(); } }); 一模一樣的代碼還是有點錯 是不是因為android版本的問

莫小忘
2014-07-31
7 回答
舉報
0/150
提交
取消
2016-11-17
這個里面的參數有大小寫不同或是都經常會報錯,細心一點就可以了
2015-04-21
是
.setButton(int whichButton,Button text,OnClickListener Listener)
2014-08-01
最后一個參數錯了, 應該是new DialogInterface.OnClickListener()
2014-08-01
第二條錯誤提示:The method onClick(DialogInterface, int) of type new DialogInterface(){} must override or implement a supertype method
2014-08-01
The type new DialogInterface(){} must implement the inherited abstract method DialogInterface.dismiss() 發不下分幾條發 (這是第一個錯誤)
2014-08-01
Multiple markers at this line - The type new DialogInterface(){} must implement the inherited abstract method DialogInterface.cancel() - The method setButton(int, CharSequence, Message) in the type AlertDialog is not applicable for the arguments (int, String, new DialogInterface(){})
2014-08-01
錯誤信息是什么???