您好所有简单的问题,你如何禁用提交按钮,直至到的EditText填充是一个if命令或什么?
b = (Button)findViewById(R.id.login);
et = (EditText)findViewById(R.id.username);
pass= (EditText)findViewById(R.id.password);
if (et & pass == ' ') {
}
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialog = ProgressDialog.show(Login.this, "",
"Validating user...", true);
new Thread(new Runnable() {
public void run() {
login();
}
}).start();
}
});