Android: need to validate certificate for non-empty input
If I want to use the maximum input length in the EditText, I can use the maxLength attribute. But if I want to enforce the minimum length (in my case, just not empty), then I don't find the corresponding minLength attribute.
I've also looked at various inputType attributes (phone, password, etc.), but I don't see anything like "required" or "not empty".
I can't believe this would require a special input filter; rather, the answer is so obvious that it simply does not write in the form I am asking.
a source to share
Be careful with something. For example, if you have a submit button and your user clicks on the submit button without changing the focus of your TextEdit, your method will not be called.
Do the operation with 2 EditTexts and 1 button named "Go":
1) User writes something to EditText1
2) User clicks on EditText2
3) Instead of writing something, you just need to click.
Your onFocusChanged () method will not be called because focus is not "lost".
If you have validation in your Go method button_click this will of course call, but you will not achieve your goal: "I was looking / hoping this is a way to give instant feedback"
You can try using TextWatcher.
a source to share