Hello all simple question how do you disable the submit button till to edittext are filled is it an if command or something ??
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();
}
});