你好所有簡單的問題你如何禁用提交按鈕,直到編輯文本填充它是一個如果命令或東西?禁用登錄按鈕,直到窗體填充android sdk
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();
}
});
http://stackoverflow.com/questions/4384890/how-to-disable-an-android-button – Orlymee 2013-04-20 01:59:52