I\'m trying to write new custom style for my android application. I need to give style to errorText which appears after setting setError in EditText
Please add it at the time of form validation if edit text field is blank.
int ecolor = R.color.black; // whatever color you want
String estring = "Please enter a valid email address";
ForegroundColorSpan fgcspan = new ForegroundColorSpan(ecolor);
SpannableStringBuilder ssbuilder = new SpannableStringBuilder(estring);
ssbuilder.setSpan(fgcspan, 0, estring.length(), 0);
edtEmail.requestFocus();
edtEmail.setError(ssbuilder);
when you write in edit text, error sign automatic goes off
Thanks Sachin