mail_xml is this:
EditText android:inputType="numberDecimal|numberSigned`
onTextChanged implemented on this and other edittexts and calls relative methods.
//and one method example:
if (editTextNumber.getText().toString().equals("") ||
editTextNumber.getText().toString().equals("-") ||
editTextNumber.getText().toString().equals(".")) {
//say its bad or reset interface so the user knows;
else {
//do stuff;
}
Should I create a class to do the validation and instantiate it, then use an if/else statement returning a boolean?
It's difficult because a -
is valid as the user types, so is a .
. But a .
and -
crashes. I'm thinking a class would be best?
I don't remember a function in java to do this, unless the api has been updated and I haven't seen it yet. I've created the classes i need and can instantiate them call their getter methods no problem. just stuck on the basic validation.