button1.setOnClickListener(
new View.OnClickListener() {
@Override
public void onClick(View_v) {
Email = edittext1.getText().toString();
Password = edittext1.getText().toString();
if (!((Email.trim().length() == 0) && (Password.trim().length() == 0 ))) {
final ProgressDialog pg = new ProgressDialog(MainActivity.this);
pg.setCancelable(false);
pg.setMessage("loading...");
pg.show();
现在又出现了另一个错误:
ProgressDialog(MainActivity.this);
pg.setCancelable(false);
pg.setMessage("loading..."); pg.show();
ˆ
Syntax error on token ".", super expected after this token
答案 0 :(得分:1)
1
pg.show();
使用 pg.show();
代替 pg.show(1);
final ProgressDialog pg = new ProgressDialog(MainActivity.this);
pg.setCancelable(false);
pg.setMessage("loading...");
pg.show();
还在;
Password = ediittext1.getText().toString();
如下面的代码
Password = ediittext1.getText().toString();
答案 1 :(得分:1)
令牌上的语法错误"。",在此令牌后超级预期
show()
对话结束。不要 show(n)
代码
final ProgressDialog pg = new ProgressDialog(MainActivity.this);
pg.setCancelable(false);
pg.setMessage("loading...");
pg.show();
修改强>
添加 ;
Password = ediittext1.getText().toString();