Check whether text is entered in edittext like this and set a boolean flag to true if it text is entered
if (!mEditText.getText().toString().equals(""))
{
textflag=true
}
and if text is not entered reset the boolean flag to false and break from the loop and you can check it like this..
if (mEditText.getText().toString().equals(""))
{
textflag=false
}
Use addTextChangedListener
like this
yourEditText.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable arg0) {
enableSubmitIfReady();
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
});
1
solved Make the button available if all fields are filled (Android) [closed]