老师,我要做的是点击一个按钮出现进度提示框5秒后消失 出现错误:The method show(Context, CharSequence, CharSequence) in the type ProgressDialog is not applicable for the arguments (new View.OnClickListener(){}, String, String)我的代码是:bt1 = (Button)findViewById(R.id.button2); et1 = (EditText) findViewById(R.id.editText1); bt1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { final ProgressDialog dialog = ProgressDialog.show(this, "Doing something","P;ease wait..."); new Thread(new Runnable() { @Override public void run() { try{ Thread.sleep(5000); dialog.dismiss(); }catch (InterruptedException e){ e.printStackTrace(); } } }).start(); } });麻烦老师帮我看一下吧
1 回答
- 1 回答
- 0 关注
- 1130 浏览
添加回答
举报
0/150
提交
取消