写button监听器的时候,看别人代码
class ButtonListener implements OnClickListener
如果我按照上面写就会报错了,改成如下形式才行
class ButtonListener extends Activity implements Button.OnClickListener
报错提示:
The type ProgressHandle.ButtonListener must implement the inherited abstract method DialogInterface.OnClickListener.onClick(DialogInterface, int)
求助网友后发现原来是导入包不对引起的问题
import android.content.DialogInterface.OnClickListener;删之重新导入包。
应该导这个包import android.view.View.OnClickListener;
之后问题得以解决
初学Android